Mineserver Wiki
mineserver_wiki
https://mineserver.be/wiki/Main_Page
MediaWiki 1.35.12
first-letter
Media
Special
Talk
User
User talk
Mineserver Wiki
Mineserver Wiki talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Main Page
0
1
1
2010-11-26T02:52:29Z
MediaWiki default
0
wikitext
text/x-wiki
'''MediaWiki has been successfully installed.'''
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
25b5c21bea6319ae81e1379d4e59bdfe9100ce36
2
1
2010-11-26T12:45:00Z
Mineserver
1
Replaced content with "'''Please wait, content coming Soon (tm)'''"
wikitext
text/x-wiki
'''Please wait, content coming Soon (tm)'''
02684ef9c2cf1822d2f8dac7fc0aea10c341b56a
4
2
2010-11-28T05:00:48Z
Deoxxa
3
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
db1a20590dacc2351871d10a09c09c498a04070b
21
4
2010-11-29T00:09:02Z
Pacino
6
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
3984d6f1fcb55608b0987093ab0a2acb7ba8d7e9
45
21
2010-12-06T22:09:58Z
Bakkdoor
11
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
627a4fa764c6d94f324783f754e94bd78aa07bd2
Configuration
0
2
3
2010-11-28T04:51:21Z
Deoxxa
3
first revision, needs a look-over
wikitext
text/x-wiki
Mineserver uses a collection of text files for configuration. They can be edited in any regular text editor and follow the format of <code>key = value</code>.
List of files:
==config.cfg==
This is the main configuration file where you will set the core options for the server. A default config file is provided with each distribution of Mineserver.
====Available Options====
{| class="wikitable"
|-
! Name
! Description
! Optional
! Default
|-
| port
| The port that the server will listen on.
| Y
| 25565
|-
| servername
| The name of the server as displayed to the client and on the server list.
| N
|
|-
| userlimit
| The number of users allowed to be connected at any one time.
| Y
| 50
|-
| map_release_time
| The amount of time (in seconds) that a chunk will be kept in memory for without being accessed or modified.
| Y
| 10
|-
| mapdir
| The directory where the map data will be held.
| N
| testmap
|-
| wrong_protocol_message
| The text displayed to clients if their version of Minecraft is incorrect.
| N
| Wrong protocol version
|-
| server_full_message
| The text displayed to clients if the server is full when they try to join.
| N
| Server is currently full
|-
| default_kick_message
| The message sent to a client when they are kicked _if_ no message is specified.
| N
| This is a default kick message
|-
| kit_<name>
| A comma separated list of items to give to players when they use the /kit <name> command. Any number of kits can be defined.
| Y
| kit_starter = "273, 274, 275, 50, 50, 50, 50, 50"
|-
| liquid_physics
| Whether or not to simulate water/lava physics.
| Y
| true
|-
| map_flatland
| Whether or not to generate flatland maps.
| Y
| false
|}
==item_alias.cfg==
This is a set of item name/id pairs for use with the /give command and other parts of the application. Multiple item names can be defined for a single ID by simply using it twice.
==admin.txt==
This is a list of administrators, one per line.
==motd.txt==
This file holds the message of the day, displayed to users as they connect or use /motd.
==rules.txt==
This file holds the rules, displayed to users when they use /rules.
78a6192767213f3f16f1ccfebb7071b7aed22a38
15
3
2010-11-28T12:41:23Z
FogWraith
5
/* Available Options */
wikitext
text/x-wiki
Mineserver uses a collection of text files for configuration. They can be edited in any regular text editor and follow the format of <code>key = value</code>.
List of files:
==config.cfg==
This is the main configuration file where you will set the core options for the server. A default config file is provided with each distribution of Mineserver.
====Available Options====
{| class="wikitable"
|-
! Name
! Description
! Optional
! Default
|-
| ip
| Specifies the IP to bind to.
| Y
| 0.0.0.0
|-
| port
| The port that the server will listen on.
| Y
| 25565
|-
| servername
| The name of the server as displayed to the client and on the server list.
| N
|
|-
| userlimit
| The number of users allowed to be connected at any one time.
| Y
| 50
|-
| map_release_time
| The amount of time (in seconds) that a chunk will be kept in memory for without being accessed or modified.
| Y
| 10
|-
| use_whitelist
| Defines the usage of a whitelist.
| Y
| false
|-
| mapdir
| The directory where the map data will be held.
| N
| testmap
|-
| wrong_protocol_message
| The text displayed to clients if their version of Minecraft is incorrect.
| N
| Wrong protocol version
|-
| server_full_message
| The text displayed to clients if the server is full when they try to join.
| N
| Server is currently full
|-
| default_kick_message
| The message sent to a client when they are kicked _if_ no message is specified.
| N
| This is a default kick message
|-
| default_banned_message
| The message sent to a client when they try to log on, and are banned.
| N
| You have been banned from this server
|-
| default_whitelist_message
| If a player is not on the whitelist, this gets sent to them.
| N
| You are not on the whitelist
|-
| kit_<name>
| A comma separated list of items to give to players when they use the /kit <name> command. Any number of kits can be defined.
| Y
| kit_starter = "273, 274, 275, 50, 50, 50, 50, 50"
|-
| liquid_physics
| Whether or not to simulate water/lava physics.
| Y
| true
|-
| map_flatland
| Whether or not to generate flatland maps.
| Y
| false
|}
==item_alias.cfg==
This is a set of item name/id pairs for use with the /give command and other parts of the application. Multiple item names can be defined for a single ID by simply using it twice.
==admin.txt==
This is a list of administrators, one per line.
==motd.txt==
This file holds the message of the day, displayed to users as they connect or use /motd.
==rules.txt==
This file holds the rules, displayed to users when they use /rules.
02fe3eef090ab6061e4bf161516f42e0b383cf68
16
15
2010-11-28T12:43:16Z
FogWraith
5
wikitext
text/x-wiki
Mineserver uses a collection of text files for configuration. They can be edited in any regular text editor and follow the format of <code>key = value</code>.
List of files:
==config.cfg==
This is the main configuration file where you will set the core options for the server. A default config file is provided with each distribution of Mineserver.
====Available Options====
{| class="wikitable"
|-
! Name
! Description
! Optional
! Default
|-
| ip
| Specifies the IP to bind to.
| Y
| 0.0.0.0
|-
| port
| The port that the server will listen on.
| Y
| 25565
|-
| servername
| The name of the server as displayed to the client and on the server list.
| N
|
|-
| userlimit
| The number of users allowed to be connected at any one time.
| Y
| 50
|-
| map_release_time
| The amount of time (in seconds) that a chunk will be kept in memory for without being accessed or modified.
| Y
| 10
|-
| use_whitelist
| Defines the usage of a whitelist.
| Y
| false
|-
| mapdir
| The directory where the map data will be held.
| N
| testmap
|-
| wrong_protocol_message
| The text displayed to clients if their version of Minecraft is incorrect.
| N
| Wrong protocol version
|-
| server_full_message
| The text displayed to clients if the server is full when they try to join.
| N
| Server is currently full
|-
| default_kick_message
| The message sent to a client when they are kicked _if_ no message is specified.
| N
| This is a default kick message
|-
| default_banned_message
| The message sent to a client when they try to log on, and are banned.
| N
| You have been banned from this server
|-
| default_whitelist_message
| If a player is not on the whitelist, this gets sent to them.
| N
| You are not on the whitelist
|-
| kit_<name>
| A comma separated list of items to give to players when they use the /kit <name> command. Any number of kits can be defined.
| Y
| kit_starter = "273, 274, 275, 50, 50, 50, 50, 50"
|-
| liquid_physics
| Whether or not to simulate water/lava physics.
| Y
| true
|-
| map_flatland
| Whether or not to generate flatland maps.
| Y
| false
|}
==item_alias.cfg==
This is a set of item name/id pairs for use with the /give command and other parts of the application. Multiple item names can be defined for a single ID by simply using it twice.
==admin.txt==
This is a list of administrators, one per line.
==banned.txt==
This is a list of banned players, one per line.
==motd.txt==
This file holds the message of the day, displayed to users as they connect or use /motd.
==rules.txt==
This file holds the rules, displayed to users when they use /rules.
==whitelist.txt==
This is a list of players on the whitelist, one per line.
3da15ab619dccd2d77bd7610c314587923637ce6
Installation
0
3
5
2010-11-28T06:42:07Z
Deoxxa
3
first revision, needs windows instructions added
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
===Building Mineserver===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
5785463062007ebbac30e2fa9b4ef6be9a113f8b
6
5
2010-11-28T06:59:47Z
Nathacof
4
/* Installing prerequisites */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS/RHEL====
CentOS/RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel libnoise-dev
===Building Mineserver===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
f644674274696520f453449c7f3ee378c9e688b7
7
6
2010-11-28T07:01:36Z
Nathacof
4
/* CentOS/RHEL */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS/RHEL====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel libnoise-dev
===Building Mineserver===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
3c5972d9f92aa671240c63d5ac693df36a24b2c7
8
7
2010-11-28T07:02:13Z
Nathacof
4
/* CentOS/RHEL */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS/RHEL====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel libnoise-dev
===Building Mineserver===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
955cd3402d71598771a4810664e84ff3a37685e9
9
8
2010-11-28T07:03:24Z
Nathacof
4
/* CentOS/RHEL */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS/RHEL====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
88d20f1625cbdf047eac3b53e715fe9b08b7f25b
10
9
2010-11-28T07:03:30Z
Deoxxa
3
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS/RHEL====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
f9132a329f10e1508989eaebc066a93f6c4a7222
11
10
2010-11-28T07:06:56Z
Nathacof
4
/* CentOS/RHEL */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, simply enter the <code>src</code> directory in the source distribution and run <code>make</code>. If you receive errors referring to missing files, check that you have all the prerequisites installed.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
6382112b887a0c4674e1bb85a83b7e7a625735b0
12
11
2010-11-28T07:15:08Z
Deoxxa
3
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
4032ed4b4841c6a3068edba672f8a2dad778ba7c
14
12
2010-11-28T12:06:49Z
Deoxxa
3
got rid of that horrible long line of code
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
2aeee3abc33cd4dbaab16ef75e95dad978285cd2
17
14
2010-11-28T21:22:36Z
Nathacof
4
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
b7cfdda8266244001f867a1ac8da6a67af9190f1
22
17
2010-11-29T02:46:59Z
Mk
7
/* Installing prerequisites */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Arch Linux stores the development headers in ''/usr/local/include/noise'' and not ''/usr/local/include/libnoise'' like the minesever build script thinks it will.
You can either change it in the mineserver source code - or - move it to the right location.
===== Change the source code =====
If you want to replace all instances of 'libnoise' with 'noise' in the source code, you can simply run the <code>sed</code> application (it's usually released with all major distributions), like so:
sed -i 's:libnoise:noise:g' mapgen.{h,cpp}
You can then proceed to run the <code>make</code> command.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
c12dc63f83e518da02c64e3f9dfaff78c2521246
23
22
2010-11-29T10:42:03Z
Batterseapower
9
OS X installation
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Arch Linux stores the development headers in ''/usr/local/include/noise'' and not ''/usr/local/include/libnoise'' like the minesever build script thinks it will.
You can either change it in the mineserver source code - or - move it to the right location.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
Finally, we need to create a symlink so that Mineserver finds the header files where it expects them (this saves us using sed on the source code):
sudo ln -s /usr/local/include/noise /usr/local/include/libnoise
===== Change the source code =====
If you want to replace all instances of 'libnoise' with 'noise' in the source code, you can simply run the <code>sed</code> application (it's usually released with all major distributions), like so:
sed -i 's:libnoise:noise:g' mapgen.{h,cpp}
You can then proceed to run the <code>make</code> command.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
8f8d9396bc067d6709e28aaa834fb3ee0308b47d
24
23
2010-11-29T10:42:36Z
Batterseapower
9
Change the source code went into the wrong section
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
This will be written up when there are binary releases available.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Arch Linux stores the development headers in ''/usr/local/include/noise'' and not ''/usr/local/include/libnoise'' like the minesever build script thinks it will.
You can either change it in the mineserver source code - or - move it to the right location.
===== Change the source code =====
If you want to replace all instances of 'libnoise' with 'noise' in the source code, you can simply run the <code>sed</code> application (it's usually released with all major distributions), like so:
sed -i 's:libnoise:noise:g' mapgen.{h,cpp}
You can then proceed to run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
Finally, we need to create a symlink so that Mineserver finds the header files where it expects them (this saves us using sed on the source code):
sudo ln -s /usr/local/include/noise /usr/local/include/libnoise
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
c37f4bfdbd1f231283bf709cb76e4b8b1d5a3fee
25
24
2010-11-29T14:56:11Z
Nredor
10
/* Binary Packages */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Arch Linux stores the development headers in ''/usr/local/include/noise'' and not ''/usr/local/include/libnoise'' like the minesever build script thinks it will.
You can either change it in the mineserver source code - or - move it to the right location.
===== Change the source code =====
If you want to replace all instances of 'libnoise' with 'noise' in the source code, you can simply run the <code>sed</code> application (it's usually released with all major distributions), like so:
sed -i 's:libnoise:noise:g' mapgen.{h,cpp}
You can then proceed to run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
Finally, we need to create a symlink so that Mineserver finds the header files where it expects them (this saves us using sed on the source code):
sudo ln -s /usr/local/include/noise /usr/local/include/libnoise
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
39bca9077578a58239b1b8e4b3a030d985d64f6b
26
25
2010-11-29T19:30:16Z
Nredor
10
/* Debian and Similar */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
Then run:
make DEBIAN=1
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Arch Linux stores the development headers in ''/usr/local/include/noise'' and not ''/usr/local/include/libnoise'' like the minesever build script thinks it will.
You can either change it in the mineserver source code - or - move it to the right location.
===== Change the source code =====
If you want to replace all instances of 'libnoise' with 'noise' in the source code, you can simply run the <code>sed</code> application (it's usually released with all major distributions), like so:
sed -i 's:libnoise:noise:g' mapgen.{h,cpp}
You can then proceed to run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
Finally, we need to create a symlink so that Mineserver finds the header files where it expects them (this saves us using sed on the source code):
sudo ln -s /usr/local/include/noise /usr/local/include/libnoise
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
8408f611b717b05e5fe23db4cdfe905b5137933d
27
26
2010-11-29T19:30:44Z
Nredor
10
/* Arch Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
Then run:
make DEBIAN=1
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
Finally, we need to create a symlink so that Mineserver finds the header files where it expects them (this saves us using sed on the source code):
sudo ln -s /usr/local/include/noise /usr/local/include/libnoise
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
f31daf7536d012f2664eb9cb60c1d72f20ba21e3
28
27
2010-11-29T19:31:15Z
Nredor
10
/* OS X */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
Then run:
make DEBIAN=1
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/libnoise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
bf6150baeeff18549841bfc3cba76093d0edf095
29
28
2010-11-29T19:32:25Z
Nredor
10
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
Then run:
make DEBIAN=1
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
102416775bbc41cd41701f1087ce2cf809bf3c90
30
29
2010-11-29T20:33:26Z
Mk
7
/* GNU/Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
Then run:
make DEBIAN=1
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
81f8762b2c20e47480b7e28be280aa000f39d3bc
31
30
2010-11-29T21:07:05Z
Nredor
10
/* Debian and Similar */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that here:
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
6d488f4b86a167a8c82a35e356bdcb55485df06b
32
31
2010-11-29T21:09:18Z
Nredor
10
/* GNU/Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
Firstly, until batterseapowers patches are merged, you need to change these lines in src/Makefile:
LDFLAGS = -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS = $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
To these:
LDFLAGS += -L/usr/local/lib -L/usr/lib -levent -lz -lnoise $(LFLAGS)
CXXFLAGS += $(DFLAGS) -I. -I/usr/Local/include -I/usr/include
This just allows us to supply some extra LDFLAGS and CXXFLAGS on the command line. Now you can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
426fe49f8d3e63a2573b3cd196af9dc33eef1952
33
32
2010-11-29T21:10:30Z
Nredor
10
/* OS X */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
9e045900db976403413764aba914c93b3d216b41
34
33
2010-11-29T22:37:38Z
Nathacof
4
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
All other dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
1b3ed30c41159cea32dc3df7956d2fdb3e5b890f
35
34
2010-11-29T22:38:22Z
Nathacof
4
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
cp -R include /usr/local/include/noise
cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
70094717a53e29bb8d22ab725a7468657bc216be
36
35
2010-12-01T09:10:03Z
Nathacof
4
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
You can install zlib and libevent using Macports:
sudo port install zlib libevent
You will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
c09c3b0e85b55da049d2f9f19feeac5f65cccfae
Frequently Asked Questions
0
4
13
2010-11-28T08:26:23Z
Nathacof
4
Created page with "; Question One : Answer One ; Question Two : Answer Two"
wikitext
text/x-wiki
; Question One
: Answer One
; Question Two
: Answer Two
266c6934ef688a1831f8cf8314238ba9081d6dc3
41
13
2010-12-06T20:17:05Z
Fador
8
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; Question Two
: Answer Two
40299db0e49a21db9fe1c59127f708ea47bfa9c2
Commands
0
5
18
2010-11-29T00:00:02Z
Pacino
6
Created page with "== For all players == * /players : Lists online players * /about : Server name & version * /rules : Shows server rules * /home : Teleports user to map spawn location * /kit..."
wikitext
text/x-wiki
== For all players ==
* /players : Lists online players
* /about : Server name & version
* /rules : Shows server rules
* /home : Teleports user to map spawn location
* /kit (name) : Gives kit. Items for kit defined in config.cfg with kit_(name) using itemId's
* /motd : Displays Message Of The Day
== Admin only ==
* %text : Servermessage
* &text : Admin-only message
* /kick nick (kickmsg) : Kicks user with optional kick message
* /ban nick : Bans (and kicks if online) user from server
* /unban nick : Lift a ban
* /save : Manually save map to disc
* /ctp x y z : Teleport to coordinates (eg. /ctp 100 100 100)
* /tp nick : Teleport yourself to nick's position
* /tp nick1 nick2 : Teleport nick1 to nick2
* /reload : Reload admins and configuration
* /give nick id/alias (count) : Gives nick count pieces of id/alias. count = 1 is used if it is not provided. Support for over 64 items. Aliases configurable with item_alias.cfg
* /rules nick : Shows server rules (from rules.txt) to nick
* /gps (nick) : Without nick shows own coordinates & heading. With nick shows nick's coordinates & heading
* /settime (time) : Sets server time. time = 0-24000 (0 and 24000 is day and about 15000 is night)
* /mute nick (mutemsg) : Mutes user with optional mute message
* /unmute nick : Unmutes user
e325aa96174527038a8c17b0f4797d9a341fe4a0
19
18
2010-11-29T00:03:51Z
Pacino
6
wikitext
text/x-wiki
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Shows server rules
|-
|/home
|Teleports user to map spawn location
|-
|/kit (name)
|Gives kit. Items for kit defined in config.cfg with kit_(name) using itemId's
|-
|/motd
|Displays Message Of The Day
|}
== Admin only ==
* %text : Servermessage
* &text : Admin-only message
* /kick nick (kickmsg) : Kicks user with optional kick message
* /ban nick : Bans (and kicks if online) user from server
* /unban nick : Lift a ban
* /save : Manually save map to disc
* /ctp x y z : Teleport to coordinates (eg. /ctp 100 100 100)
* /tp nick : Teleport yourself to nick's position
* /tp nick1 nick2 : Teleport nick1 to nick2
* /reload : Reload admins and configuration
* /give nick id/alias (count) : Gives nick count pieces of id/alias. count = 1 is used if it is not provided. Support for over 64 items. Aliases configurable with item_alias.cfg
* /rules nick : Shows server rules (from rules.txt) to nick
* /gps (nick) : Without nick shows own coordinates & heading. With nick shows nick's coordinates & heading
* /settime (time) : Sets server time. time = 0-24000 (0 and 24000 is day and about 15000 is night)
* /mute nick (mutemsg) : Mutes user with optional mute message
* /unmute nick : Unmutes user
66ddd85de1348e3f0dabe883c954712d4a1db952
20
19
2010-11-29T00:08:30Z
Pacino
6
wikitext
text/x-wiki
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Shows server rules
|-
|/home
|Teleports user to map spawn location
|-
|/kit (name)
|Gives kit. Items for kit defined in config.cfg with kit_(name) using itemId's
|-
|/motd
|Displays Message Of The Day
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick nick (kickmsg)
|Kicks user with optional kick message
|-
|/ban nick
|Bans (and kicks if online) user from server
|-
|/unban nick
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp x y z
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp nick
|Teleport yourself to nick's position
|-
|/tp nick1 nick2
|Teleport nick1 to nick2
|-
|/reload
|Reload admins and configuration
|-
|/give nick id/alias (count)
|Gives nick count pieces of id/alias. count = 1 is used if it is not provided. Support for over 64 items. Aliases configurable with item_alias.cfg
|-
|/rules nick
|Shows server rules (from rules.txt) to nick
|-
|/gps (nick)
|Without nick shows own coordinates & heading. With nick shows nick's coordinates & heading
|-
|/settime (time)
|Sets server time. time = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute nick (mutemsg)
|Mutes user with optional mute message
|-
|/unmute nick
|Unmutes user
|}
7038039643db8f66d1f81ec383b9ec6ffa4c0f07
37
20
2010-12-01T11:07:04Z
Nredor
10
/* For all players */
wikitext
text/x-wiki
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick nick (kickmsg)
|Kicks user with optional kick message
|-
|/ban nick
|Bans (and kicks if online) user from server
|-
|/unban nick
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp x y z
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp nick
|Teleport yourself to nick's position
|-
|/tp nick1 nick2
|Teleport nick1 to nick2
|-
|/reload
|Reload admins and configuration
|-
|/give nick id/alias (count)
|Gives nick count pieces of id/alias. count = 1 is used if it is not provided. Support for over 64 items. Aliases configurable with item_alias.cfg
|-
|/rules nick
|Shows server rules (from rules.txt) to nick
|-
|/gps (nick)
|Without nick shows own coordinates & heading. With nick shows nick's coordinates & heading
|-
|/settime (time)
|Sets server time. time = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute nick (mutemsg)
|Mutes user with optional mute message
|-
|/unmute nick
|Unmutes user
|}
2a963268202e63cb28a74a11c5a3c8c88467caf0
38
37
2010-12-01T11:15:16Z
Nredor
10
/* Admin only */
wikitext
text/x-wiki
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
591da692692a1f21dfb761556e63e9d3f73b6b83
39
38
2010-12-01T11:17:43Z
Nredor
10
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
c1af71a17793c97c50a786e715c86fdec450e15d
40
39
2010-12-06T02:20:24Z
Fador
8
/* Admin only */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
639aee33bdde3a16585bf868d0ec5e091f8492de
42
40
2010-12-06T22:08:29Z
Bakkdoor
11
/* Admin only */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|}
405ea7d8ce42efc029afff94df7f0ce8eb0c15bf
43
42
2010-12-06T22:08:54Z
Bakkdoor
11
/* Admin only */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
639aee33bdde3a16585bf868d0ec5e091f8492de
44
43
2010-12-06T22:09:11Z
Bakkdoor
11
/* For all players */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
d5e2ebb49497b251fa1603fef61db2c61d74d2ee
Coding Style
0
6
46
2010-12-06T22:19:05Z
Bakkdoor
11
Created page with "This is a suggestion for a coding style to be used consistently accross Mineserver's source code. * '''Indentation''': 2 spaces * '''Class names''': Camelcase, starting with upp..."
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** For loop variables short-names are ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
8d784dccb96b0366e53c7be13f66c8957e8ddc2c
47
46
2010-12-06T22:19:31Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
3dac05747efed8631f010ae5049af87e64251e69
48
47
2010-12-06T22:27:42Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''':
ab7fdfdf2797acf65d0f3f504097d7a40e7b31b3
49
48
2010-12-06T22:29:15Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''':
20f1170abcf21144f5395a8521b434cff840449a
50
49
2010-12-06T22:31:53Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
9553e7c6342232095eb0caa3402ad5e6968cfad3
Coding Style
0
6
51
50
2010-12-06T22:32:08Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
4a56f84fe566706580e0bd6446649aa1e4bbd853
52
51
2010-12-06T22:32:31Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
* '''Namespaces''': We probably should use them.
2087dc18d353aaac1506cf08f5ef05b5e8961c66
53
52
2010-12-06T22:36:52Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine. Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance varibles we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
5c7a7afecbddb907250423d070dff6f1199df338
54
53
2010-12-06T22:39:06Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
9970aefb16ab32ee4c16ce963c9bf67de568f1e5
55
54
2010-12-06T22:39:27Z
Nredor
10
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo {
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
408369f7351d87bcba2f4e60f4b76a2bb59735b0
56
55
2010-12-06T22:39:49Z
Nredor
10
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
4078c0e60a655d1fc5f02ad90c97f89392d9d398
57
56
2010-12-06T22:40:15Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
}
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
9cd45e39c8ec02479fac51782ec72cce03f54180
58
57
2010-12-06T22:41:11Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
b87cab40eb506227496aa1b88ef334cde10107fa
59
58
2010-12-06T22:41:49Z
Nredor
10
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
88ee90e0de81a21a5609cc4598b1f83591e442f3
60
59
2010-12-06T22:53:02Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use either '''_foo''', '''m_foo''', '''mFoo''' etc. I personally prefer '''_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
9c3ef52c2779decbe0533709065882e27cc818c8
63
60
2010-12-07T09:55:51Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''':
if(true)
foo = bar;
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
fc43f21eb1f7cd85eb0211c8f0272d35f8bf3e98
64
63
2010-12-07T10:00:57Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': (Use braces always for clarity and to prevent bugs while editing code)
if(true) {
foo = bar;
}
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
3ffa14e81db6a40481a2b6be213853989e6e1481
65
64
2010-12-07T10:02:21Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use javadoc-style documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': (Use braces always for clarity and to prevent bugs while editing code)
if(true)
{
foo = bar;
}
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
95cfa0f0f1cd1496af32286688471a920892a621
66
65
2010-12-07T10:04:47Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use doxygen-style (javadoc-style?) documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': (Use braces always for clarity and to prevent bugs while editing code)
if(true)
{
foo = bar;
}
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
62dc3a4c87a96f37e5d23661709eb3460c75dbaf
67
66
2010-12-07T14:38:22Z
Bakkdoor
11
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use doxygen-style (javadoc-style?) documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
** '''Static (class) variables''' should start with just an underscore, e.g. '''_instance''', '''_users''' etc.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': (Use braces always for clarity and to prevent bugs while editing code)
if(true)
{
foo = bar;
}
if(true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for(int i = 0; i < 1; i++)
{
}
a349106e07419e184337d693d6cd14b31cfc68d5
Configuration
0
2
61
16
2010-12-07T02:39:02Z
Bakkdoor
11
wikitext
text/x-wiki
Mineserver uses a collection of text files for configuration. They can be edited in any regular text editor and follow the format of <code>key = value</code>.
List of files:
==config.cfg==
This is the main configuration file where you will set the core options for the server. A default config file is provided with each distribution of Mineserver.
====Available Options====
{| class="wikitable"
|-
! Name
! Description
! Optional
! Default
|-
| ip
| Specifies the IP to bind to.
| Y
| 0.0.0.0
|-
| port
| The port that the server will listen on.
| Y
| 25565
|-
| servername
| The name of the server as displayed to the client and on the server list.
| N
|
|-
| userlimit
| The number of users allowed to be connected at any one time.
| Y
| 50
|-
| map_release_time
| The amount of time (in seconds) that a chunk will be kept in memory for without being accessed or modified.
| Y
| 10
|-
| use_whitelist
| Defines the usage of a whitelist.
| Y
| false
|-
| mapdir
| The directory where the map data will be held.
| N
| testmap
|-
| wrong_protocol_message
| The text displayed to clients if their version of Minecraft is incorrect.
| N
| Wrong protocol version
|-
| server_full_message
| The text displayed to clients if the server is full when they try to join.
| N
| Server is currently full
|-
| default_kick_message
| The message sent to a client when they are kicked _if_ no message is specified.
| N
| This is a default kick message
|-
| default_banned_message
| The message sent to a client when they try to log on, and are banned.
| N
| You have been banned from this server
|-
| default_whitelist_message
| If a player is not on the whitelist, this gets sent to them.
| N
| You are not on the whitelist
|-
| kit_<name>
| A comma separated list of items to give to players when they use the /kit <name> command. Any number of kits can be defined.
| Y
| kit_starter = "273, 274, 275, 50, 50, 50, 50, 50"
|-
| liquid_physics
| Whether or not to simulate water/lava physics.
| Y
| true
|-
| map_flatland
| Whether or not to generate flatland maps.
| Y
| false
|}
==item_alias.cfg==
This is a set of item name/id pairs for use with the /give command and other parts of the application. Multiple item names can be defined for a single ID by simply using it twice.
==roles.txt==
This is a list of players and their permissions/roles. You can define admins, operators (ops) and members (trusted people). Everyone not listed here will have the Guest permissions by default.
==banned.txt==
This is a list of banned players, one per line.
==motd.txt==
This file holds the message of the day, displayed to users as they connect or use /motd.
==rules.txt==
This file holds the rules, displayed to users when they use /rules.
==whitelist.txt==
This is a list of players on the whitelist, one per line.
32073b092085ddd4e842117001e560279550116b
62
61
2010-12-07T02:40:14Z
Bakkdoor
11
wikitext
text/x-wiki
Mineserver uses a collection of text files for configuration. They can be edited in any regular text editor and follow the format of <code>key = value</code>.
List of files:
==config.cfg==
This is the main configuration file where you will set the core options for the server. A default config file is provided with each distribution of Mineserver.
====Available Options====
{| class="wikitable"
|-
! Name
! Description
! Optional
! Default
|-
| ip
| Specifies the IP to bind to.
| Y
| 0.0.0.0
|-
| port
| The port that the server will listen on.
| Y
| 25565
|-
| servername
| The name of the server as displayed to the client and on the server list.
| N
|
|-
| userlimit
| The number of users allowed to be connected at any one time.
| Y
| 50
|-
| map_release_time
| The amount of time (in seconds) that a chunk will be kept in memory for without being accessed or modified.
| Y
| 10
|-
| use_whitelist
| Defines the usage of a whitelist.
| Y
| false
|-
| mapdir
| The directory where the map data will be held.
| N
| testmap
|-
| wrong_protocol_message
| The text displayed to clients if their version of Minecraft is incorrect.
| N
| Wrong protocol version
|-
| server_full_message
| The text displayed to clients if the server is full when they try to join.
| N
| Server is currently full
|-
| default_kick_message
| The message sent to a client when they are kicked _if_ no message is specified.
| N
| This is a default kick message
|-
| default_banned_message
| The message sent to a client when they try to log on, and are banned.
| N
| You have been banned from this server
|-
| default_whitelist_message
| If a player is not on the whitelist, this gets sent to them.
| N
| You are not on the whitelist
|-
| kit_<name>
| A comma separated list of items to give to players when they use the /kit <name> command. Any number of kits can be defined.
| Y
| kit_starter = "273, 274, 275, 50, 50, 50, 50, 50"
|-
| liquid_physics
| Whether or not to simulate water/lava physics.
| Y
| true
|-
| map_flatland
| Whether or not to generate flatland maps.
| Y
| false
|}
==item_alias.cfg==
This is a set of item name/id pairs for use with the /give command and other parts of the application. Multiple item names can be defined for a single ID by simply using it twice.
==roles.txt==
This is a list of players and their permissions/roles. You can define admins, operators (ops) and members (trusted people). Everyone not listed here will have the Guest permissions by default.
==banned.txt==
This is a list of banned players, one per line.
==motd.txt==
This file holds the message of the day, displayed to users as they connect or use /motd.
==rules.txt==
This file holds the rules, displayed to users when they use /rules.
==whitelist.txt==
This is a list of players on the whitelist, one per line.
==commands.cfg==
This is a list of available chat commands, each associated with a minimum permission role needed to execute it (admin, op, member or guest).
79d8f3560f41e85f6f8513e2083c45f7c60f49fc
Installation
0
3
68
36
2010-12-14T09:56:54Z
Krono
12
/* OS X */ Homebrew alternative
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
705eae9dde784a8e97df668f9670462cd8a4b3b4
69
68
2010-12-14T10:05:00Z
Krono
12
/* OS X */ Alternative build instructions
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
468a9e836fc38827f9bff5ef86e3b4059f9de692
70
69
2010-12-21T09:48:30Z
Fador
8
/* Prerequisites */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise. The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
bd87207a04aee37bfcbb64859a32422070ee8313
93
70
2011-01-12T20:58:39Z
Fador
8
/* Prerequisites */ libnoise url
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
(needs to be filled in)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
dd7de0ea2e96957f5de7aac3178f098235ea73db
96
93
2011-01-13T22:13:37Z
Liamallan
14
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
23a24d15fcb8483e5987d3a6d59f8a791756ca40
User talk:Nathacof
3
7
71
2010-12-27T22:28:14Z
Nathacof
4
Created page with "= Plugins = == Binlog == ===Configuration === ;(bool) enable_binlog :enable binary logging ;(string) binlog :filename of the binary log ===Commands=== Revert changes from the bin..."
wikitext
text/x-wiki
= Plugins =
== Binlog ==
===Configuration ===
;(bool) enable_binlog
:enable binary logging
;(string) binlog
:filename of the binary log
===Commands===
Revert changes from the binary log:
<code>/rollback <timestamp> <nick></code>
Playback events found in the binary log:
<code> /playback <timestamp> <nick> </code>
4c6c42583a299f068ad3a1c64522c2fdcfb1a1fd
72
71
2010-12-27T22:28:44Z
Nathacof
4
/* Commands */
wikitext
text/x-wiki
= Plugins =
== Binlog ==
===Configuration ===
;(bool) enable_binlog
:enable binary logging
;(string) binlog
:filename of the binary log
===Commands===
;Revert changes from the binary log:
:<code>/rollback <timestamp> <nick></code>
;Playback events found in the binary log:
:<code> /playback <timestamp> <nick> </code>
4e0969593f305d93eee67701ed5aa2c5e34fc7c3
Plugin API
0
8
73
2010-12-29T19:15:42Z
Fador
8
Created page with "Mineserver uses a C-plugin API which is described in this page. ==Creating a plugin== You will need to include <code>plugin_api.h</code> to your project. ...write some more st..."
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion("(plugin_name)") > 0)
{
mineserver->screen.log("(plugin_name) is already loaded v." +dtos(mineserver->plugin.getPluginVersion("(plugin_name)")));
return;
}
mineserver->screen.log("Loaded \"(plugin_name)\"!");
mineserver->plugin.setPluginVersion("(plugin_name)", PLUGIN_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)chatPreFunction);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion("(plugin_name)") <= 0)
{
mineserver->screen.log("(plugin_name) is not loaded!");
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''sendmsgTo'''
| (std::string user,std::string msg)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|-
| '''sendmsg'''
| (std::string message)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|}
bc40b44e2d1bd16d6f9792c0f5b05c08d0f550f9
76
73
2011-01-03T23:09:03Z
Fador
8
Callbacks
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion("(plugin_name)") > 0)
{
mineserver->screen.log("(plugin_name) is already loaded v." +dtos(mineserver->plugin.getPluginVersion("(plugin_name)")));
return;
}
mineserver->screen.log("Loaded \"(plugin_name)\"!");
mineserver->plugin.setPluginVersion("(plugin_name)", PLUGIN_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)chatPreFunction);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion("(plugin_name)") <= 0)
{
mineserver->screen.log("(plugin_name) is not loaded!");
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''sendmsgTo'''
| (std::string user,std::string msg)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|-
| '''sendmsg'''
| (std::string message)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre<'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
35752d8899dbcecc50a51ef4548782d5917e3de9
77
76
2011-01-04T00:06:54Z
Fador
8
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion("(plugin_name)") > 0)
{
mineserver->screen.log("(plugin_name) is already loaded v." +dtos(mineserver->plugin.getPluginVersion("(plugin_name)")));
return;
}
mineserver->screen.log("Loaded \"(plugin_name)\"!");
mineserver->plugin.setPluginVersion("(plugin_name)", PLUGIN_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)chatPreFunction);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion("(plugin_name)") <= 0)
{
mineserver->screen.log("(plugin_name) is not loaded!");
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''sendmsgTo'''
| (std::string user,std::string msg)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|-
| '''sendmsg'''
| (std::string message)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|-
| '''getBlock'''
| (int x, int y, int z, unsigned char* type,unsigned char* meta)
| bool
|-
| colspan="3" | Get block type and metadata (absolute block coordinates)
|-
| '''setBlock'''
| (int x, int y, int z, unsigned char type,unsigned char meta)
| bool
|-
| colspan="3" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre<'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ec1b53c4c993c464453af57a0744a51e2a460c4a
78
77
2011-01-04T00:29:46Z
Fador
8
/* Available callbacks */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion("(plugin_name)") > 0)
{
mineserver->screen.log("(plugin_name) is already loaded v." +dtos(mineserver->plugin.getPluginVersion("(plugin_name)")));
return;
}
mineserver->screen.log("Loaded \"(plugin_name)\"!");
mineserver->plugin.setPluginVersion("(plugin_name)", PLUGIN_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)chatPreFunction);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion("(plugin_name)") <= 0)
{
mineserver->screen.log("(plugin_name) is not loaded!");
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''sendmsgTo'''
| (std::string user,std::string msg)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|-
| '''sendmsg'''
| (std::string message)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|-
| '''getBlock'''
| (int x, int y, int z, unsigned char* type,unsigned char* meta)
| bool
|-
| colspan="3" | Get block type and metadata (absolute block coordinates)
|-
| '''setBlock'''
| (int x, int y, int z, unsigned char type,unsigned char meta)
| bool
|-
| colspan="3" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
e22601de4f5c51520e3051c89109a04b345f7fd8
83
78
2011-01-06T23:05:15Z
Fador
8
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str(),msg.size());
mineserver->plugin.setPluginVersion(pluginName.c_str(),pluginName.size(), PLUGIN_COMMAND_VERSION);
std::string hookName="ChatPre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME);
hookName = "BlockPlacePre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) <= 0)
{
std::string msg="command is not loaded!";
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''sendmsgTo'''
| (std::string user,std::string msg)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|-
| '''sendmsg'''
| (std::string message)
| bool, telling it the user was found
|-
| colspan="3" | This function is used to send msg to single user
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|-
| '''getBlock'''
| (int x, int y, int z, unsigned char* type,unsigned char* meta)
| bool
|-
| colspan="3" | Get block type and metadata (absolute block coordinates)
|-
| '''setBlock'''
| (int x, int y, int z, unsigned char type,unsigned char meta)
| bool
|-
| colspan="3" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
41565060a2ff6ebff0dbd19a6232d111f5f82ca0
84
83
2011-01-06T23:32:09Z
Fador
8
/* Chat */ new table formatting
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str(),msg.size());
mineserver->plugin.setPluginVersion(pluginName.c_str(),pluginName.size(), PLUGIN_COMMAND_VERSION);
std::string hookName="ChatPre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME);
hookName = "BlockPlacePre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) <= 0)
{
std::string msg="command is not loaded!";
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row5"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row2"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''log'''
| (std::string message)
| none
|-
| colspan="3" | Prints message to server window
|}
====Map====
{| class="wikitable"
|-
! Function
! Parameters
! Return value
|-
| '''createPickupSpawn'''
| (int x, int y, int z, int type, int count, int health, std::string user)
| none
|-
| colspan="3" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|-
| '''setTime'''
| (std::string timeValue)
| bool
|-
| colspan="3" | Sets server time to timeValue, which can be a string of value 0-24000
|-
| '''getSpawn'''
| (int* x, int* y, int* z)
| void
|-
| colspan="3" | Gets server spawn position
|-
| '''getBlock'''
| (int x, int y, int z, unsigned char* type,unsigned char* meta)
| bool
|-
| colspan="3" | Get block type and metadata (absolute block coordinates)
|-
| '''setBlock'''
| (int x, int y, int z, unsigned char type,unsigned char meta)
| bool
|-
| colspan="3" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
936fd671459917efb283101662e117e36142f85d
85
84
2011-01-06T23:57:06Z
Fador
8
new format..
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str(),msg.size());
mineserver->plugin.setPluginVersion(pluginName.c_str(),pluginName.size(), PLUGIN_COMMAND_VERSION);
std::string hookName="ChatPre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME);
hookName = "BlockPlacePre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) <= 0)
{
std::string msg="command is not loaded!";
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row5"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row2"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row2"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row8"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="7" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row8"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|-
! Name
! Parameters
! Return value
|-
| '''ChatPre'''
| const std::string& nick, std::string msg
| bool
|-
| colspan="3" | called on chat message prosessing, returning false will terminate the callback.
|-
| '''BlockPlacePre'''
| const std::string& nick, int x,char y,int z,char block
| bool
|-
| colspan="3" | called on block placement, returning false will prevent block placement and terminate callback.
|-
| '''BlockBreakPre'''
| (int* x, int* y, int* z)
| bool
|-
| colspan="3" | called on block break, returning false will prevent block breaking and terminate callback.
|}
9213387e968d76edd822d4272169c8f5bcd212e9
86
85
2011-01-07T00:03:15Z
Fador
8
callback formatted.
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str(),msg.size());
mineserver->plugin.setPluginVersion(pluginName.c_str(),pluginName.size(), PLUGIN_COMMAND_VERSION);
std::string hookName="ChatPre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME);
hookName = "BlockPlacePre";
mineserver->callback.add_hook(hookName.c_str(),hookName.size(), (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str(),pluginName.size()) <= 0)
{
std::string msg="command is not loaded!";
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row5"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row2"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row2"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | length of the message
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row8"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="7" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row8"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''ChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in char array
|- class="row5"
| class="col1" | msgLen
| class="col2" | size_t
| class="col3" | Length of the message
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row5"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row6"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row7"
| class="col1" | block
| class="col2" | char
| class="col3" | block type
|- class="row8"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row9"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | userLen
| class="col2" | size_t
| class="col3" | Length of username
|- class="row4"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row5"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row6"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row8"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row9"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
f36dbefa607f4614df70b2847d9587d3a0a8ee58
87
86
2011-01-07T01:26:20Z
Fador
8
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->callback.add_hook("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''ChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | char
| class="col3" | block type
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
a6bb3cc28cd8dfff4815e6be08db419ada9ea94e
89
87
2011-01-08T20:35:08Z
Fador
8
/* Available callbacks */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->callback.add_hook("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''ChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | char
| class="col3" | block type
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
b95719c58bcc64f5a9a4a67cf52ad61399e827be
90
89
2011-01-08T22:30:38Z
Fador
8
/* Available callbacks */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->callback.add_hook("ChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->callback.add_hook("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | char
| class="col3" | block type
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
5a64e097db9349fe771090d060d35335a724336a
91
90
2011-01-08T22:31:19Z
Fador
8
/* Creating a plugin */ example update
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | char
| class="col3" | block type
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
9932eb5a6c85026060a80c2eca91573d796a6940
92
91
2011-01-10T23:05:28Z
Fador
8
/* Available callbacks */ BlockPlacePre update
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message prosessing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
007a56e066772ee8bbee4c1210d522bbf88f1ce9
100
92
2011-01-15T14:48:46Z
Samuel-Sama
15
/* Available callbacks */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
bb322b631ab470a1afa3be02721afd665ee38df9
Main Page
0
1
74
45
2010-12-29T19:15:56Z
Fador
8
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
* [[Plugin_API]]
b9b32985f2478f567d71bd7d39f499cb73d04b5a
75
74
2010-12-29T19:16:06Z
Fador
8
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
* [[Plugin API]]
ec0829532cbf1c11c72d473435bb7ff95619fe1b
Talk:Plugin API
1
9
79
2011-01-05T01:04:44Z
Nathacof
4
Created page with "<code>sendBlock()</code> ~~~~"
wikitext
text/x-wiki
<code>sendBlock()</code> [[User:Nathacof|Nathacof]] 03:04, 5 January 2011 (EET)
a6eb41c93e0de5cb2f106c36587a46d6543cf225
81
79
2011-01-05T07:36:36Z
Nathacof
4
wikitext
text/x-wiki
=A few Questions=
* There's no <code>sendBlock()</code> in the plugin_api.h file?
* Why is <code>dtos()</code> defined in command.cpp but referenced in the example plugin?
* How do I get a callback function to accept a User object if I do not include the class files in my plugin?
c6f4a79fd952bfae40fa74ad82369980d43f9fa2
82
81
2011-01-05T07:59:25Z
Nathacof
4
/* A few Questions */
wikitext
text/x-wiki
=A few Questions=
* There's no <code>sendBlock()</code> in the plugin_api.h file? [[User:Nathacof|Nathacof]]
* Why is <code>dtos()</code> defined in command.cpp but referenced in the example plugin? [[User:Nathacof|Nathacof]]
* How do I get a callback function to accept a User object if I do not include the class files in my plugin? [[User:Nathacof|Nathacof]]
050b2849153047314896a63b92f79f9f982fd8a8
88
82
2011-01-07T22:14:43Z
Fador
8
/* A few Questions */
wikitext
text/x-wiki
=A few Questions=
* There's no <code>sendBlock()</code> in the plugin_api.h file? [[User:Nathacof|Nathacof]]
It's done automatically on setBlock() --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
* Why is <code>dtos()</code> defined in command.cpp but referenced in the example plugin? [[User:Nathacof|Nathacof]]
Now it's in the example --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
* How do I get a callback function to accept a User object if I do not include the class files in my plugin? [[User:Nathacof|Nathacof]]
Users are referenced by the name (char *), no objects are used --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
e8eb25f3a2c51f3435c8d5bdadb70a45c9868c5a
User:Nathacof
2
10
80
2011-01-05T01:46:56Z
Nathacof
4
Created page with "Oh hai there!"
wikitext
text/x-wiki
Oh hai there!
a61bf195f3f0055efd7bd5758a1fc3b8212028ee
Frequently Asked Questions
0
4
94
41
2011-01-13T22:09:45Z
Liamallan
14
Added more questions for you
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What ipnaddress do we have to use
: You have to use your modem or ipv4 ip address, goto cmd and type "ipconfig" to find out your ivp4 ip address
; can we use Hamachi
: yes you can use hamachi, The ip you need for the configuration is your hamachi ip address
; is there a built in GUI
: no not at this time. It's a command based program, simple and easy to use
; can you run thisnon WinXP
: no you cannot, minecraft is not comparable with XP
f77d68c4083c24c49116dddcf16be257facf6791
95
94
2011-01-13T22:10:12Z
Liamallan
14
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What ip address do we have to use
: You have to use your modem or ipv4 ip address, goto cmd and type "ipconfig" to find out your ivp4 ip address
; can we use Hamachi
: yes you can use hamachi, The ip you need for the configuration is your hamachi ip address
; is there a built in GUI
: no not at this time. It's a command based program, simple and easy to use
; can you run thisnon WinXP
: no you cannot, minecraft is not comparable with XP
be9b249e111b7a45804d59af4625c0627abfe8b6
97
95
2011-01-13T22:14:32Z
Liamallan
14
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What ip address do we have to use
: You have to use your modem or ipv4 ip address, goto cmd and type "ipconfig" to find out your ivp4 ip address
; can we use Hamachi
: yes you can use hamachi, The ip you need for the configuration is your hamachi ip address
; is there a built in GUI
: no not at this time. It's a command based program, simple and easy to use
; can you run thisnon WinXP
: no you cannot, minecraft is not comparable with XP
; where can I get my ip address from
: goto www.cmyip.com
48ca9f148b39d843386d0cdae4c50beabbecca80
Help:Contents
12
11
98
2011-01-13T22:17:09Z
Liamallan
14
Created page with "I am a user that uses mineserver as my server If you need any help at all, email me Metroid-Liam@hotmail.co.uk Thanks mineserver you rock my socks of"
wikitext
text/x-wiki
I am a user that uses mineserver as my server
If you need any help at all, email me
Metroid-Liam@hotmail.co.uk
Thanks mineserver you rock my socks of
e92e27cbad9ad303fc07ff61aec47ef22f493013
User:Liamallan
2
12
99
2011-01-13T22:23:35Z
Liamallan
14
Created page with "A full time minecraft player, with his own mineserver server If you want you can add me on Skype "liamallan12345" is my username And if you need any help at all send me a email M..."
wikitext
text/x-wiki
A full time minecraft player, with his own mineserver server
If you want you can add me on Skype "liamallan12345" is my username
And if you need any help at all send me a email
Metroid-Liam@hotmail.co.uk
Thanks
58e2728b11173f8ae402985262429088541c13dc
Plugin API
0
8
101
100
2011-01-16T00:08:03Z
Fador
8
/* Available callbacks */ PlayerChatCommand
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''sendmsgTo'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''sendmsg'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, telling it the user was found
|}
====Screen====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''log'''
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | Prints message to server window
|}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
71fac8a2f08e1be2160e647e76f47b38ba649cb3
129
101
2011-02-26T18:28:01Z
Delirium
18
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''createPickupSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | count
| class="col2" | int
| class="col3" | How many to spawn (1-64)
|- class="row4"
| class="col1" | health
| class="col2" | int
| class="col3" | item health (0 = full health, max value depends on the item)
|- class="row5"
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row7"
| class="col0" colspan="4" | Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''setTime'''
| class="col1" | timeValue
| class="col2" | int
| class="col3" | value 0-24000
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row3"
| class="col0" colspan="4" | Sets server time to timeValue, which can be in range 0-24000
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
f5d218476bd15208b3d7d598c21031d7e62037ec
131
129
2011-02-26T18:39:34Z
Delirium
18
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{{APIFunct6|createPickupSpawn|x|int|x-coordinate|y|int|y-coordinate|z|int|z-coordinate|conut|int|How many to spawn(1-64)|health|int|item health. 0 is max health, max value depends on the item|user|const char*|Username|void|Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.}}
{{APIFunct1|setTime|timeValue|int|value between 0 and 2400|bool|Sets server time to ''timeValue''}}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
3cf88721e8665c8f817914cefbcc59d37a5d0a54
137
131
2011-02-26T20:21:17Z
Delirium
18
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{{APIFunct6|createPickupSpawn|x|int|x-coordinate|y|int|y-coordinate|z|int|z-coordinate|conut|int|How many to spawn(1-64)|health|int|item health. 0 is max health, max value depends on the item|user|const char*|Username|void|Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.}}
{{APIFunct1|setTime|timeValue|int|value between 0 and 2400|bool|Sets server time to ''timeValue''}}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
{{APIFunctVoid|saveWholeMap| |void| |Saves the whole map to disk}}
{{APIFunct2|getMapData_block|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_meta|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_skylight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_blocklight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
====User Functions====
{{APIFunct1|toggleDND|user|const char*|Username in null terminated char array|bool, indicates if user was found|Toggles the DND (Do not Disturb)-Mode of a ''user''}}
{{APIFunct7|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|yaw|float*|yaw-Value|pitch|float*|pitch-Value|*stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct8|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|w|int*|World ID|yaw|float*|yaw-Value|pitch|float*|pitch-Value|*stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
5953c5532d7cca817c28da32a38a7181cadd44f1
140
137
2011-02-26T21:27:19Z
Delirium
18
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include "plugin_api.h"
#define PLUGIN_VERSION 1.0
std::string dtos( double n )
{
std::ostringstream result;
result << n;
return result.str();
}
mineserver_pointer_struct* mineserver;
std::string pluginName = "command";
PLUGIN_API_EXPORT void (plugin_name)_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0)
{
std::string msg="command is already loaded v." +dtos(mineserver->plugin.getPluginVersion(pluginName.c_str()));
mineserver->screen.log(msg.c_str(),msg.size());
return;
}
std::string msg="Loaded "+pluginName+"!";
mineserver->screen.log(msg.c_str());
mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMAND_VERSION);
mineserver->plugin.addCallback("PlayerChatPre", (void *)SOMEFUNCTIONNAME);
mineserver->plugin.addCallback("BlockPlacePre", (void *)SOMEFUNCTIONNAME2);
}
PLUGIN_API_EXPORT void (plugin_name)_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName.c_str()) <= 0)
{
mineserver->screen.log("command is not loaded!"));
return;
}
}
</code>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{{APIFunct6|createPickupSpawn|x|int|x-coordinate|y|int|y-coordinate|z|int|z-coordinate|conut|int|How many to spawn(1-64)|health|int|item health. 0 is max health, max value depends on the item|user|const char*|Username|void|Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.}}
{{APIFunct1|setTime|timeValue|int|value between 0 and 2400|bool|Sets server time to ''timeValue''}}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
{{APIFunctVoid|saveWholeMap| |void| |Saves the whole map to disk}}
{{APIFunct2|getMapData_block|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_meta|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_skylight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_blocklight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
====User Functions====
{{APIFunct1|toggleDND|user|const char*|Username in null terminated char array|bool, indicates if user was found|Toggles the DND (Do not Disturb)-Mode of a ''user''}}
{{APIFunct7|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|yaw|float*|yaw-Value|pitch|float*|pitch-Value|*stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct8|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|w|int*|World ID|yaw|float*|yaw-Value|pitch|float*|pitch-Value| *stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct4|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z''}}
{{APIFunct5|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|map|int|Map ID|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z'' on ''map''}}
{{APIFunct2|setHealth|user|const char*|Username in null terminated char array|userHealth|int|Health of ''user''. Must not be greater than 20.|bool, true if user is not null|Sets the health of a ''user''.}}
{{APIFunct1|getHealth|user|const char*|Username in null terminated char array|int, player's health|Gets the health of a ''user''}}
{{APIFunct1|no paramters| | |int, number of players online|Gets the number of players online}}
{{APIFunct4|getItemInHand|user|const char*|Username in null terminated char array|*type|int|Type of item|*meta|int|Health of item|*quant|int|quantity of item|bool, true if user was found|Gets the item in the hand of ''user''}}
{{APIFunct4|setItemInHand|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Sets the item in the hand of ''user''}}
{{APIFunct4|addItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Adds the ''item'' to the ''user'''s inventory}}
{{APIFunct4|hasItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if the item is in Users inventory. Chests are unchecked.|Checks if ''item'' is in ''user'''s inventory}}
{{APIFunct4|delItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Delets the ''item'' ''quantity'' times from the ''user'''s inventory. Chests are untouched.}}
{{APIFunct1|kick|user|const char*|Username in null terminated char array|bool, true if user is found|Kicks ''user'' with standard reason "You have been kicked"}}
====Config wrapper functions====
{{APIFunct1|has|name|const char*|name of the config string|bool, true if config string was found|Checks if the config string ''name'' exists in the configuration file}}
{{APIFunct1|iData|name|const char*|name of the config string|int|Gets integer data from configuration string ''name''}}
{{APIFunct1|lData|name|const char*|name of the config string|int64_t|Gets long (int64_t) data from configuration string ''name''}}
{{APIFunct1|fData|name|const char*|name of the config string|float|Gets float data from configuration string ''name''}}
{{APIFunct1|dData|name|const char*|name of the config string|double|Gets double data from configuration string ''name''}}
{{APIFunct1|sData|name|const char*|name of the config string|const char*|Gets string (char*) data from configuration string ''name''}}
{{APIFunct1|bData|name|const char*|name of the config string|bool|Gets bool data from configuration string ''name''}}
====Mobs====
====Permissions====
{{APIFunct1|setAdmin|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server administrator, providing him with full permissions.}}
{{APIFunct1|setOp|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server Operator}}
{{APIFunct1|setMember|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a regular member}}
{{APIFunct1|setGuest|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a guest}}
{{APIFunct1|isAdmin|name|const char*|Username in null terminated char array|bool, true if user is admin|Checks, if ''user'' is a server administrator}}
{{APIFunct1|isOp|name|const char*|Username in null terminated char array|bool, true if user is operator|Checks, if ''user'' is a server Operator}}
{{APIFunct1|isMember|name|const char*|Username in null terminated char array|bool, true if user is member|Checks, if ''user'' is a regular member}}
{{APIFunct1|Guest|name|const char*|Username in null terminated char array|bool, true if user is guest|Checks, if ''user'' is a guest}}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
6238eb8dc5d4ac91784dc5988b25610d1abddc85
Coding Style
0
6
102
67
2011-01-16T12:15:14Z
Deoxxa
3
changed the spacing information to what's actually used in the source
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': Camelcase, starting with uppercase letter, e.g.: '''FurnaceManager'''
* '''Variable and method names''': Camelcase, starting with lowercase letter, e.g.: '''updateWorld()''', '''userCommands'''.
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use doxygen-style (javadoc-style?) documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
** '''Static (class) variables''' should start with just an underscore, e.g. '''_instance''', '''_users''' etc.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': Use braces always for clarity and to prevent bugs while editing code
if (true)
{
foo = bar;
}
if (true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for (int i = 0; i < 1; i++)
{
...
}
88075b7f1da274405ab6e683e89ee8f17255b916
Frequently Asked Questions
0
4
103
97
2011-01-25T05:17:18Z
Drewbug
16
Cleaned it up a bit
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What IP address do I have to use?
: You have to use either your local or remote IP address. If you're on Windows, go to the command prompt (cmd) and type "ipconfig" to find out which IP address you should use.
; Can I use Hamachi?
: Yes, you can use Hamachi. The IP address you need to put in Mineserver's configuration file is your Hamachi IP address.
; Is there a built-in GUI?
: No, not at this time. It's a command-based program; simple and easy to use.
; Can you run this on Windows XP?
: No,you can not. Mineserver is not compatible with Windows XP.
; How can I find out what my remote IP address is?
: Go to [www.cmyip.com].
1f014bd4204083606921b67bf23c4ad5d2d1f716
104
103
2011-01-25T05:17:51Z
Drewbug
16
forgot the http:// prefix for cmyip.com link
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What IP address do I have to use?
: You have to use either your local or remote IP address. If you're on Windows, go to the command prompt (cmd) and type "ipconfig" to find out which IP address you should use.
; Can I use Hamachi?
: Yes, you can use Hamachi. The IP address you need to put in Mineserver's configuration file is your Hamachi IP address.
; Is there a built-in GUI?
: No, not at this time. It's a command-based program; simple and easy to use.
; Can you run this on Windows XP?
: No,you can not. Mineserver is not compatible with Windows XP.
; How can I find out what my remote IP address is?
: Go to [http://www.cmyip.com].
aca0265cb2b802e4fcafd08203dbce586c7b007d
105
104
2011-01-25T05:38:01Z
Drewbug
16
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What IP address do I have to use?
: You have to use either your local or remote IP address. If you're on Windows, go to the command prompt (cmd) and type "ipconfig" to find out which IP address you should use.
; Can I use Hamachi?
: Yes, you can use Hamachi. The IP address you need to put in Mineserver's configuration file is your Hamachi IP address.
; Is there a built-in GUI?
: No, not at this time. It's a command-based program; simple and easy to use.
; Can you run this on Windows XP?
: No, you can not. Mineserver is not compatible with Windows XP.
; How can I find out what my remote IP address is?
: Go to [http://www.cmyip.com].
6f897ab2bf1d12b8c6e3c331f4e71decbc6b4c23
108
105
2011-01-25T18:24:40Z
Fador
8
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What IP address do I have to use?
: You have to use either your local or remote IP address. If you're on Windows, go to the command prompt (cmd) and type "ipconfig" to find out which IP address you should use.
; Can I use Hamachi?
: Yes, you can use Hamachi. The IP address you need to put in Mineserver's configuration file is your Hamachi IP address.
; Is there a built-in GUI?
: No, not at this time. It's a command-based program; simple and easy to use.
; Can you run this on Windows XP?
: Sure.
; How can I find out what my remote IP address is?
: Go to [http://www.cmyip.com].
3c16086e87dba281b28fae0975b7003a6b2c4813
111
108
2011-01-25T18:35:25Z
Nredor
10
wikitext
text/x-wiki
; Isn't it illegal to copy Notch's code?!
: We have created this software without decompiling the original codes. It's also a bit different in some ways. We only use the same protocol.
; What IP address do I have to use?
: You have to use either your local or remote IP address. If you're on Windows, go to the command prompt (cmd) and type "ipconfig" to find out which IP address you should use.
; Can I use Hamachi?
: Yes, you can use Hamachi. The IP address you need to put in Mineserver's configuration file is your Hamachi IP address.
; Is there a built-in GUI?
: We have [[Plugins|plugin]] for NCurses gui but there won't be built-in GUI.
; Can you run this on Windows XP?
: Sure.
; How can I find out what my remote IP address is?
: Go to [http://www.cmyip.com].
d3166ce29649d8e2140aeb6c97b2ff7a18d05552
Main Page
0
1
106
75
2011-01-25T18:10:53Z
Nredor
10
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
* [[Plugin API]]
----
* [[Plugins]]
541177d8197c0f5fc124d3baded1d7e053acdb6c
Plugins
0
13
107
2011-01-25T18:20:50Z
Nredor
10
Created page with "== Current plugins for Mineserver == Notice that plugins may have limited functionality and they are still being developed. * '''Commands''' - Add some commands to game (Included..."
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
* '''Commands''' - Add some commands to game (Included)
* '''Ncurses ui''' - Nice ui for server (Included)
* '''Binlog''' - Log and rollback block changes(Included)
* '''nBreak''' - Notch-style block breaking(Included)
* '''Filelog''' - Log chat and stdout to files (Included)
* '''ircchat''' - Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
* '''nether''' - needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
c0e83f936f2c243804377421ba55b0dd0deff691
112
107
2011-01-25T21:43:59Z
Nathacof
4
/* Current plugins for Mineserver */
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[Plugin:Commands|Commands]]
:Add some commands to game (Included)
;[[Plugin:Ncursesui|Ncurses UI]]
:Nice ui for server (Included)
;[[Plugin:Binlog|Binlog]]
:Log and rollback block changes(Included)
;[[Plugin:nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Plugin:Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[Plugin:ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Plugin:Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
320d343064c74bdde33fba8252ffa1dd620fd757
Configuration
0
2
109
62
2011-01-25T18:31:56Z
Nredor
10
Replaced content with "* Latest configuration file with explanations can be found here: https://github.com/fador/mineserver/blob/master/bin/config.cfg
* Configurable item aliases can be found here:..."
wikitext
text/x-wiki
* Latest configuration file with explanations can be found here: https://github.com/fador/mineserver/blob/master/bin/config.cfg
* Configurable item aliases can be found here: https://github.com/fador/mineserver/blob/master/bin/item_alias.cfg
9e18072dcf687d5102ea37cc64df80a6165195d3
Commands
0
5
110
44
2011-01-25T18:33:23Z
Nredor
10
Replaced content with "All commands are now being moved from core to commands plugin which can be found at [[Plugins]]"
wikitext
text/x-wiki
All commands are now being moved from core to commands plugin which can be found at [[Plugins]]
f573a7ada375a2fc16c257997b88d17dcc63fe6b
120
110
2011-01-26T00:09:04Z
Nathacof
4
Redirected page to [[Plugin:Commands]]
wikitext
text/x-wiki
#REDIRECT[[Plugin:Commands]]
All commands are now being moved from core to commands plugin which can be found at [[Plugins]]
775e675a7c2eec3a222470388288a79c6f0dc8ac
149
120
2011-02-26T22:36:37Z
Delirium
18
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/i <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/world <worldnumber>
|Teleport to another world defined in config.cfg. Worlds are in ALPHABETIC order.
|}
[[Category:Plugins]]
804a6b66c6d1ba2aa29002e5bcf3b383f73b513b
Plugin:Commands
0
14
113
2011-01-25T21:44:25Z
Nathacof
4
Created page with "Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test k..."
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/kit <name>
|Gives kit. Items for kit defined in config.cfg with kit_<name> using item id's
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|-
|/emote, /em, /e, /me
|Emote
|-
|/whisper, /w, /tell, /t
|Send a private message to another player
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
d5e2ebb49497b251fa1603fef61db2c61d74d2ee
114
113
2011-01-25T21:45:21Z
Nathacof
4
/* For all players */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|%text
|Servermessage
|-
|&text
|Admin-only message
|-
|/kick <player> [reason]
|Kicks <player> with optional kick message
|-
|/ban <player> [reason]
|Bans (and kicks if online) <player> from server
|-
|/unban <player>
|Lift a ban
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/reload
|Reload admins and configuration
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/igive <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/mute <player> [reason]
|Mutes <player> with optional message
|-
|/unmute <player>
|Unmutes <player>
|-
|/regen
|Regenerates lightning
|-
|/sethealth <player> <health>
|Set <player>'s health. <health> = 0-20
|}
10e6e7bb4ffedd6e8e2fc65ce1f6094f5da0ca6c
115
114
2011-01-25T21:46:41Z
Nathacof
4
/* Admin only */
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/i <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|}
cebeed826989c8c7ccecb3c7de08d341eb9c96ae
121
115
2011-02-03T08:37:56Z
Fador
8
/* Admin only */ /world
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/i <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/world <worldnumber>
|Teleport to another world defined in config.cfg. Worlds are in ALPHABETIC order.
|}
9240d70278e13d1e060374355705c55c7c530548
148
121
2011-02-26T22:22:08Z
Delirium
18
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/i <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/world <worldnumber>
|Teleport to another world defined in config.cfg. Worlds are in ALPHABETIC order.
|}
[[Category:Plugins]]
804a6b66c6d1ba2aa29002e5bcf3b383f73b513b
150
148
2011-02-26T22:36:49Z
Delirium
18
Redirected page to [[Commands]]
wikitext
text/x-wiki
#REDIRECT[[Commands]]
fd28a083e2d5ef73a6848f1fb9411b799f63d14d
Plugin:Binlog
0
15
116
2011-01-25T22:45:19Z
Nathacof
4
Created page with "{| class="wikitable" |- ! Command ! Description |- |/rollback [<epochtime>[<nick>]] |Rollback block changes for a specific timeframe and optionally user. With no arguments all bl..."
wikitext
text/x-wiki
{| class="wikitable"
|-
! Command
! Description
|-
|/rollback [<epochtime>[<nick>]]
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|/playback [<epochtime>[<nick>]]
|not yet implemented
|}
e52621c01b748bcdb66fd8d71f03aecd1cfbfa1f
117
116
2011-01-25T22:48:04Z
Nathacof
4
wikitext
text/x-wiki
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
09cf77cc576ddbc90cd8429d09c5b947b5717b98
118
117
2011-01-25T22:50:06Z
Nathacof
4
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to rollback changes to the map.
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
0307b338006772fd110e65b20d7926a0f59e81ca
119
118
2011-01-25T22:52:27Z
Nathacof
4
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.]
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
e4022c96ab759ee1c8a9b2d60db09e1cd75ef97c
145
119
2011-02-26T22:20:22Z
Delirium
18
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.]
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
[[Category:Plugins]]
30fd51ab4fe65a16605404a63072ebce81614b2f
Installation
0
3
122
96
2011-02-04T21:46:56Z
Fishyghost
17
/* CentOS and Red Hat */ Added a workaround that I had to perform
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
bf67754656970067d180852be05bf5461cf97ca7
123
122
2011-02-05T08:08:57Z
Nathacof
4
/* Installing prerequisites */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
You may need to create the proper link for the libnoise shared object file:
<code>ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so</code>
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
8072a025bd5d5d7576d52c767462492400ac5333
124
123
2011-02-05T08:10:02Z
Nathacof
4
/* BSD Variants */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
You may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
b6e9c911c55eb03ed8bd822e312373096bb9e4f0
125
124
2011-02-05T08:10:33Z
Nathacof
4
/* BSD Variants */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 4 external libraries: ncurses (pdcurses on windows), zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
e7bf31cf750e8a427f01871d15a1843f7567cbd6
Template:APIFunctVoid
10
16
126
2011-02-26T18:13:50Z
Delirium
18
Created page with "<noinclude> = Usage = <pre><nowiki> {{APIFunctVoid|function name|parameter|parameter type|parameter info|description}} </nowiki></pre> = Template Preview = {{APIFunctVoid|functio..."
wikitext
text/x-wiki
<noinclude>
= Usage =
<pre><nowiki>
{{APIFunctVoid|function name|parameter|parameter type|parameter info|description}}
</nowiki></pre>
= Template Preview =
{{APIFunctVoid|function name|parameter|parameter type|parameter info|description}}
= Template =
</noinclude>
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row3"
| class="col0" colspan="4" | {{{5}}}
|}
eef890825c8bd7d8a3c08465796dd1d119df9528
Template:APIFunct1
10
17
127
2011-02-26T18:16:35Z
Delirium
18
Created page with "<noinclude> = Usage = <pre><nowiki> {{APIFunct1|function name|parameter|parameter type|parameter info|return value|description}} </nowiki></pre> = Template Preview = {{APIFunct1|..."
wikitext
text/x-wiki
<noinclude>
= Usage =
<pre><nowiki>
{{APIFunct1|function name|parameter|parameter type|parameter info|return value|description}}
</nowiki></pre>
= Template Preview =
{{APIFunct1|function name|parameter|parameter type|parameter info|return value|description}}
= Template =
</noinclude>
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{5}}}
|- class="row3"
| class="col0" colspan="4" | {{{6}}}
|}
fe620d3c9c602993be421eea43d8e186f81a8798
Template:APIFunct2
10
18
128
2011-02-26T18:25:59Z
Delirium
18
Created page with "<noinclude> = Usage = <pre><nowiki> {{APIFunct2|function name|parameter1|parameter type1|parameter info1|parameter2|parameter type2|parameter info2|return value|description}} </n..."
wikitext
text/x-wiki
<noinclude>
= Usage =
<pre><nowiki>
{{APIFunct2|function name|parameter1|parameter type1|parameter info1|parameter2|parameter type2|parameter info2|return value|description}}
</nowiki></pre>
= Template Preview =
{{APIFunct2|function name|parameter1|parameter type1|parameter info1|parameter2|parameter type2|parameter info2|return value|description}}
= Template =
</noinclude>
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="2" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{8}}}
|- class="row4"
| class="col0" colspan="4" | {{{9}}}
|}
18c48e4041c54e2943bea3179dd64eb10940321d
Template:APIFunct6
10
19
130
2011-02-26T18:30:52Z
Delirium
18
Created page with "{| class="wikitable" |- class="row0" ! class="col0" | Function ! class="col1" | Parameter name ! class="col2" | Parameter type ! class="col3" | Parameter info |- class="row1" | c..."
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{20}}}
|- class="row7"
| class="col0" colspan="4" | {{{21}}}
|}
6f3d7eff0d58d5ad6b01aa7c10bef148dce550e6
Template:APIFunct7
10
20
132
2011-02-26T19:48:24Z
Delirium
18
Created page with "{| class="wikitable" |- class="row0" ! class="col0" | Function ! class="col1" | Parameter name ! class="col2" | Parameter type ! class="col3" | Parameter info |- class="row1" | c..."
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
| class="col1" | {{{20}}}
| class="col2" | {{{21}}}
| class="col3" | {{{22}}}
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{23}}}
|- class="row7"
| class="col0" colspan="4" | {{{24}}}
|}
cc543c97300d6229ef42a2e76bcc923bd0bf4ec0
135
132
2011-02-26T20:20:20Z
Delirium
18
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="7" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
| class="col1" | {{{20}}}
| class="col2" | {{{21}}}
| class="col3" | {{{22}}}
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{23}}}
|- class="row7"
| class="col0" colspan="4" | {{{24}}}
|}
f621ada07d8de1fea4abcdc48b53c9aec0bd8f2b
Template:APIFunct8
10
21
133
2011-02-26T20:07:20Z
Delirium
18
Created page with "{| class="wikitable" |- class="row0" ! class="col0" | Function ! class="col1" | Parameter name ! class="col2" | Parameter type ! class="col3" | Parameter info |- class="row1" | c..."
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
| class="col1" | {{{20}}}
| class="col2" | {{{21}}}
| class="col3" | {{{22}}}
|- class="row7"
| class="col1" | {{{21}}}
| class="col2" | {{{22}}}
| class="col3" | {{{23}}}
|- class="row8"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{24}}}
|- class="row9"
| class="col0" colspan="4" | {{{25}}}
|}
b4eb4e1ceae0f9bb323c04ea5d02df138e8380af
136
133
2011-02-26T20:20:43Z
Delirium
18
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="8" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
| class="col1" | {{{20}}}
| class="col2" | {{{21}}}
| class="col3" | {{{22}}}
|- class="row7"
| class="col1" | {{{21}}}
| class="col2" | {{{22}}}
| class="col3" | {{{23}}}
|- class="row8"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{24}}}
|- class="row9"
| class="col0" colspan="4" | {{{25}}}
|}
ee87eab05a5ee7d6029a603eace293ee9523b9e1
138
136
2011-02-26T20:23:56Z
Delirium
18
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="8" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
| class="col1" | {{{17}}}
| class="col2" | {{{18}}}
| class="col3" | {{{19}}}
|- class="row6"
| class="col1" | {{{20}}}
| class="col2" | {{{21}}}
| class="col3" | {{{22}}}
|- class="row7"
| class="col1" | {{{23}}}
| class="col2" | {{{24}}}
| class="col3" | {{{25}}}
|- class="row8"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{26}}}
|- class="row9"
| class="col0" colspan="4" | {{{27}}}
|}
9cf1dce4d064731f44fa5009e456382325ba596c
Template:APIFunct4
10
22
134
2011-02-26T20:20:09Z
Delirium
18
Created page with "{| class="wikitable" |- class="row0" ! class="col0" | Function ! class="col1" | Parameter name ! class="col2" | Parameter type ! class="col3" | Parameter info |- class="row1" | c..."
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{14}}}
|- class="row6"
| class="col0" colspan="4" | {{{15}}}
|}
2d8069280a6b9281a0ac90aebcba7196a55c92d8
Template:APIFunct5
10
23
139
2011-02-26T20:27:38Z
Delirium
18
Created page with "{| class="wikitable" |- class="row0" ! class="col0" | Function ! class="col1" | Parameter name ! class="col2" | Parameter type ! class="col3" | Parameter info |- class="row1" | c..."
wikitext
text/x-wiki
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''{{{1}}}'''
| class="col1" | {{{2}}}
| class="col2" | {{{3}}}
| class="col3" | {{{4}}}
|- class="row2"
| class="col1" | {{{5}}}
| class="col2" | {{{6}}}
| class="col3" | {{{7}}}
|- class="row3"
| class="col1" | {{{8}}}
| class="col2" | {{{9}}}
| class="col3" | {{{10}}}
|- class="row4"
| class="col1" | {{{11}}}
| class="col2" | {{{12}}}
| class="col3" | {{{13}}}
|- class="row4"
| class="col1" | {{{14}}}
| class="col2" | {{{15}}}
| class="col3" | {{{16}}}
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | {{{17}}}
|- class="row6"
| class="col0" colspan="4" | {{{18}}}
|}
6a206a1150a6b3012270cc9a898a276d73db28b5
Talk:Plugin API
1
9
141
88
2011-02-26T21:55:02Z
Delirium
18
/* ToDo */ new section
wikitext
text/x-wiki
=A few Questions=
* There's no <code>sendBlock()</code> in the plugin_api.h file? [[User:Nathacof|Nathacof]]
It's done automatically on setBlock() --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
* Why is <code>dtos()</code> defined in command.cpp but referenced in the example plugin? [[User:Nathacof|Nathacof]]
Now it's in the example --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
* How do I get a callback function to accept a User object if I do not include the class files in my plugin? [[User:Nathacof|Nathacof]]
Users are referenced by the name (char *), no objects are used --[[User:Fador|Fador]] 00:14, 8 January 2011 (EET)
== ToDo ==
When work on mob functions is finished, should be documentated here. [[User:Delirium|Delirium]] 23:55, 26 February 2011 (EET)
b34c3941a44030c157873f595112c3ffa86effc9
Moving over from official server
0
24
142
2011-02-26T22:18:08Z
Delirium
18
Created page with "If you have already a working minecraft server, but want to use Mineserver, you can easily move over! =Preperation= First of all, make a backup of your whole minecraft server. I..."
wikitext
text/x-wiki
If you have already a working minecraft server, but want to use Mineserver, you can easily move over!
=Preperation=
First of all, make a backup of your whole minecraft server. If anything went differently form your expectations, you can always go back.
Second, make sure your Minecraft world is in "old" Beta 1.2 File format. As of 26.2.2011, Mineserver does not support the new Beta 1.3 File format. Beta 1.3 clients can connect tough.
=Do the work=
[[Install|Installation]] Mineserver in a directory on your server. Edit the settings file to fit your needs, copy your world to the desired path and make sure the path is correctly specified in the settings. That's it! You can start Mineserver and start playing.
=What's about plugins?=
At the moment, there are not many [[plugins]]. But you can write your own - just check the [[Plugin API]].
d7e97e0d5e8482e125eb8fecd4e5c68729ed8199
143
142
2011-02-26T22:18:20Z
Delirium
18
/* Preperation */
wikitext
text/x-wiki
If you have already a working minecraft server, but want to use Mineserver, you can easily move over!
=Preparation=
First of all, make a backup of your whole minecraft server. If anything went differently form your expectations, you can always go back.
Second, make sure your Minecraft world is in "old" Beta 1.2 File format. As of 26.2.2011, Mineserver does not support the new Beta 1.3 File format. Beta 1.3 clients can connect tough.
=Do the work=
[[Install|Installation]] Mineserver in a directory on your server. Edit the settings file to fit your needs, copy your world to the desired path and make sure the path is correctly specified in the settings. That's it! You can start Mineserver and start playing.
=What's about plugins?=
At the moment, there are not many [[plugins]]. But you can write your own - just check the [[Plugin API]].
436e425cac4939474aca4d2fd09750904acbbec7
144
143
2011-02-26T22:18:36Z
Delirium
18
/* Do the work */
wikitext
text/x-wiki
If you have already a working minecraft server, but want to use Mineserver, you can easily move over!
=Preparation=
First of all, make a backup of your whole minecraft server. If anything went differently form your expectations, you can always go back.
Second, make sure your Minecraft world is in "old" Beta 1.2 File format. As of 26.2.2011, Mineserver does not support the new Beta 1.3 File format. Beta 1.3 clients can connect tough.
=Do the work=
[[Installation|Install]] Mineserver in a directory on your server. Edit the settings file to fit your needs, copy your world to the desired path and make sure the path is correctly specified in the settings. That's it! You can start Mineserver and start playing.
=What's about plugins?=
At the moment, there are not many [[plugins]]. But you can write your own - just check the [[Plugin API]].
57d829b25e480cbbb5da55e16fbd63fa868cd556
Category:Plugins
14
25
146
2011-02-26T22:20:49Z
Delirium
18
Created page with "Here is a list of all availiable plugins for Mineserver."
wikitext
text/x-wiki
Here is a list of all availiable plugins for Mineserver.
1f194f4a3722b3eaa09c8d0e3ac70b40501c8edc
147
146
2011-02-26T22:21:23Z
Delirium
18
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[Plugin:Commands|Commands]]
:Add some commands to game (Included)
;[[Plugin:Ncursesui|Ncurses UI]]
:Nice ui for server (Included)
;[[Plugin:Binlog|Binlog]]
:Log and rollback block changes(Included)
;[[Plugin:nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Plugin:Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[Plugin:ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Plugin:Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
320d343064c74bdde33fba8252ffa1dd620fd757
Plugin:Binlog
0
15
151
145
2011-02-26T22:37:40Z
Delirium
18
Redirected page to [[Binlog]]
wikitext
text/x-wiki
#REDIRECT[[Binlog]]
2dd9ab1d02070ec45a916d1d9680044d94ddc1f4
Binlog
0
26
152
2011-02-26T22:37:46Z
Delirium
18
Created page with "=Description= The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.] =Comma..."
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.]
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
[[Category:Plugins]]
30fd51ab4fe65a16605404a63072ebce81614b2f
161
152
2011-02-26T23:11:07Z
Delirium
18
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.]
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
[[Category:Plugins|Included Plugins]]
daee3f175cffb0c33e259a9f2ec0eb6431cbea9b
164
161
2011-02-26T23:12:56Z
Delirium
18
wikitext
text/x-wiki
=Description=
The binlog plugin records block which are created and destroyed allowing players to [http://www.youtube.com/watch?v=3MaApuaSVMM rollback changes to the map.]
=Commands=
{| class="wikitable"
|-
! Command
! Description
|-
|<tt>/rollback [<epochtime>[<nick>]]</tt>
|Rollback block changes for a specific timeframe and optionally user. With no arguments all blocks are reverted from the binary log.
|-
|<tt>/playback [<epochtime>[<nick>]]</tt>
|not yet implemented
|}
=Config=
{| class="wikitable"
|-
! Config
! Description
|-
|enable_binary_log
|enables transaction logging
|-
|binary_log
|the filename to use for the transaction log
|}
[[Category:Plugins]]
[[Category:Included Plugins]]
a05252ded12b366ec6b607664d76f8a70437ac2e
Category:Plugins
14
25
153
147
2011-02-26T22:38:10Z
Delirium
18
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[Plugin:Ncursesui|Ncurses UI]]
:Nice ui for server (Included)
;[[Plugin:nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Plugin:Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[Plugin:ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Plugin:Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
44157794a510adf06d70f2e693462074bb39fd7e
156
153
2011-02-26T23:01:33Z
Delirium
18
/* Current plugins for Mineserver */
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[CursesUI|Curses UI]]
:Nice ui for server (Included)
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
cf0f39252ab8a0082813543569a724790b6c3d71
159
156
2011-02-26T23:10:18Z
Delirium
18
/* Current plugins for Mineserver */
wikitext
text/x-wiki
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
2a716ce71d1e87fd79786d760dfce47b3a4bec74
166
159
2011-02-26T23:14:25Z
Delirium
18
wikitext
text/x-wiki
These Category contains all Plugins of Mineserver.
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
de5b7a68f8cf39a8ee7b506800fa620e45c8f950
167
166
2011-02-27T09:56:30Z
Delirium
18
wikitext
text/x-wiki
This Category contains all Plugins of Mineserver.
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
bf5a1709bacc87060f1325c9aff0c722545ed135
168
167
2011-02-27T09:58:12Z
Delirium
18
wikitext
text/x-wiki
This category contains all plugins of Mineserver.
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
57acaa62a9d90626b001a9f543b25d95f2aa5e88
189
168
2011-03-01T19:42:14Z
Nredor
10
wikitext
text/x-wiki
This category contains all plugins of Mineserver.
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[Commands]]
:Chat commands
;[[CursesUI]]
:NCurses based ui for mineserver
;[[Binlog]]
:The binlog plugin records block which are created and destroyed allowing players to rollback changes to the map.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
;[[PassiveMobs]]
:Adds passive mobs like sheeps and cows. Proof-of-concept. Good base for expanding/improving Mob AI
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
03b8b6cd8623dffdfa7b033a82a3fb8c2df8056f
190
189
2011-03-01T19:43:07Z
Nredor
10
wikitext
text/x-wiki
This category contains all plugins of Mineserver.
== Current plugins for Mineserver ==
Notice that plugins may have limited functionality and they are still being developed.
;[[Commands]]
:Basic chat commands
;[[CursesUI]]
:NCurses based ui for mineserver
;[[Binlog]]
:The binlog plugin records block which are created and destroyed allowing players to rollback changes to the map.
;[[nBreak|nBreak]]
:Notch-style block breaking(Included)
;[[Filelog|Filelog]]
:Log chat and stdout to files (Included)
;[[ircchat|Ircchat]]
:Bridge between irc and minecraft chat (https://github.com/bluepeppers/mineserver/tree/master/plugins/ircchat)
;[[Nether|Nether]]
:needed for nether-normal world portals (Included)
;[[PassiveMobs]]
:Adds passive mobs like sheeps and cows. Proof-of-concept. Good base for expanding/improving Mob AI
'''Note:''' Those that are Included can be found at https://github.com/fador/mineserver/tree/master/plugins
dafd12648c46e5f552e03e7b1561d8de11dbe48c
Plugins
0
13
154
112
2011-02-26T22:52:52Z
Delirium
18
Replaced content with "#REDIRECT[Category:Plugins]"
wikitext
text/x-wiki
#REDIRECT[Category:Plugins]
b394323cd828bb6c1aca81fb9e53de2d65d38733
155
154
2011-02-26T22:53:01Z
Delirium
18
Redirected page to [[Category:Plugins]]
wikitext
text/x-wiki
#REDIRECT[[Category:Plugins]]
68400b92f0fe79447ad09b3f81e6765a9e0e1361
File:Cursesui.png
6
27
157
2011-02-26T23:05:37Z
Delirium
18
Screenshot of the main window of Mineservers GUI, CuresesUI.
wikitext
text/x-wiki
Screenshot of the main window of Mineservers GUI, CuresesUI.
a6a34c9f4627a632d40aaeac36c8750799fb2afd
CursesUI
0
28
158
2011-02-26T23:09:38Z
Delirium
18
Created page with "[[File:cursesui.png|300px|thumb|right|Screenshot of CursesUI]] CursesUI is a GUI for Mineserver. It's included in the default mineserver package. It has got a list of all online ..."
wikitext
text/x-wiki
[[File:cursesui.png|300px|thumb|right|Screenshot of CursesUI]]
CursesUI is a GUI for Mineserver. It's included in the default mineserver package.
It has got a list of all online players, the console and the chat log. Entered commands will be shown in the commmand history area.
'''Important: When you use the plugin, make sure you set the system.interface.use_cli config variable to false - otherwise CursesUI dows not function properly!'''
[[Category:Plugins]]
136e73009b636ebf64a09354613adcaa39a36188
163
158
2011-02-26T23:12:35Z
Delirium
18
wikitext
text/x-wiki
[[File:cursesui.png|300px|thumb|right|Screenshot of CursesUI]]
CursesUI is a GUI for Mineserver. It's included in the default mineserver package.
It has got a list of all online players, the console and the chat log. Entered commands will be shown in the commmand history area.
'''Important: When you use the plugin, make sure you set the system.interface.use_cli config variable to false - otherwise CursesUI dows not function properly!'''
[[Category:Plugins]]
[[Category:Included Plugins]]
33a387b594e83fe69373f9ac602a74af049302d8
Category:Included Plugins
14
29
160
2011-02-26T23:10:44Z
Delirium
18
Created page with "[[Category:Plugins]]"
wikitext
text/x-wiki
[[Category:Plugins]]
38b1402fbf5a9990d36c505df6bc8ff85cd44b7a
165
160
2011-02-26T23:13:51Z
Delirium
18
wikitext
text/x-wiki
Plugins listed here are included with the main package of Mineserver.
[[Category:Plugins]]
8c0381da45f41f93148d096821fb692e98dcc447
Commands
0
5
162
149
2011-02-26T23:12:15Z
Delirium
18
wikitext
text/x-wiki
Parameters that are marked with <> (example: <player>) are required. Parameters marked with [] (example: [reason]) are optional. Usage example: "/kick johntheminer this is test kick"
== For all players ==
{| class="wikitable"
|-
! Command
! Description
|-
|/help [<commandname>]
|Displays help text showing all commands and their description, or, if <commandname> given, displays description text for that command.
|-
|/players, /who
|Lists online players
|-
|/about
|Server name & version
|-
|/rules
|Show server rules
|-
|/home
|Teleports player to map spawn location
|-
|/motd
|Display Message Of The Day
|-
|/dnd
|Do Not Disturb - toggles whether the player receives chat & private messages
|}
== Admin only ==
{| class="wikitable"
|-
! Command
! Description
|-
|/save
|Manually save map to disc
|-
|/ctp <x> <y> <z>
|Teleport to coordinates (eg. /ctp 100 100 100)
|-
|/tp <player>
|Teleport yourself to <player>'s position
|-
|/tp <player1> <player2>
|Teleport <player1> to <player2>
|-
|/give <player> <id/alias> [count]
|Gives <player> [count] pieces of <id/alias>. By default [count] = 1. Supports over 64 items. Aliases configurable in item_alias.cfg
|-
|/i <id/alias> [count]
|Gives self [count] pieces of <id/alias>. By default [count] = 1.
|-
|/rules <player>
|Shows server rules (from rules.txt) to <player>
|-
|/gps [player]
|Without [player] shows own coordinates & heading. With [player] shows [player]'s coordinates & heading
|-
|/settime <time>
|Sets server time. <time> = 0-24000 (0 and 24000 is day and about 15000 is night)
|-
|/world <worldnumber>
|Teleport to another world defined in config.cfg. Worlds are in ALPHABETIC order.
|}
[[Category:Plugins]]
[[Category:Included Plugins]]
b261227bd555cc9db5050ed8bbc156cbf470bbdb
Plugin API
0
8
169
140
2011-02-27T21:03:44Z
Delirium
18
/* Creating a plugin */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<code>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <cstdlib>
#include <iostream>
#define MINESERVER_C_API
#include "../src/plugin_api.h"
#include "../src/logtype.h"
#define PLUGIN_VERSION 1.0
double pluginVersion = PLUGIN_VERSION;
#define PLUGIN_NAME "samplePlugin"
const char* pluginName = PLUGIN_NAME;
const char* logSource = "plugin.screen";
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void CALLCONVERSION samplePlugin_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName) > 0)
{
mineserver->logger.log(LogType::LOG_INFO, logSource, "The " PLUGIN_NAME " plugin is already loaded");
return;
}
mineserver->logger.log(LogType::LOG_INFO, logSource, "Loaded " PLUGIN_NAME);
mineserver->plugin.setPluginVersion(pluginName, pluginVersion);
}
PLUGIN_API_EXPORT void CALLCONVERSION samplePlugin_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName) <= 0)
{
mineserver->logger.log(LogType::LOG_INFO, logSource, PLUGIN_NAME " is not loaded!");
return;
}
mineserver->logger.log(LogType::LOG_INFO, logSource, PLUGIN_NAME " has been unloaded!");
}
</code>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{{APIFunct6|createPickupSpawn|x|int|x-coordinate|y|int|y-coordinate|z|int|z-coordinate|conut|int|How many to spawn(1-64)|health|int|item health. 0 is max health, max value depends on the item|user|const char*|Username|void|Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.}}
{{APIFunct1|setTime|timeValue|int|value between 0 and 2400|bool|Sets server time to ''timeValue''}}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
{{APIFunctVoid|saveWholeMap| |void| |Saves the whole map to disk}}
{{APIFunct2|getMapData_block|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_meta|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_skylight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_blocklight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
====User Functions====
{{APIFunct1|toggleDND|user|const char*|Username in null terminated char array|bool, indicates if user was found|Toggles the DND (Do not Disturb)-Mode of a ''user''}}
{{APIFunct7|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|yaw|float*|yaw-Value|pitch|float*|pitch-Value|*stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct8|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|w|int*|World ID|yaw|float*|yaw-Value|pitch|float*|pitch-Value| *stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct4|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z''}}
{{APIFunct5|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|map|int|Map ID|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z'' on ''map''}}
{{APIFunct2|setHealth|user|const char*|Username in null terminated char array|userHealth|int|Health of ''user''. Must not be greater than 20.|bool, true if user is not null|Sets the health of a ''user''.}}
{{APIFunct1|getHealth|user|const char*|Username in null terminated char array|int, player's health|Gets the health of a ''user''}}
{{APIFunct1|no paramters| | |int, number of players online|Gets the number of players online}}
{{APIFunct4|getItemInHand|user|const char*|Username in null terminated char array|*type|int|Type of item|*meta|int|Health of item|*quant|int|quantity of item|bool, true if user was found|Gets the item in the hand of ''user''}}
{{APIFunct4|setItemInHand|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Sets the item in the hand of ''user''}}
{{APIFunct4|addItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Adds the ''item'' to the ''user'''s inventory}}
{{APIFunct4|hasItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if the item is in Users inventory. Chests are unchecked.|Checks if ''item'' is in ''user'''s inventory}}
{{APIFunct4|delItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Delets the ''item'' ''quantity'' times from the ''user'''s inventory. Chests are untouched.}}
{{APIFunct1|kick|user|const char*|Username in null terminated char array|bool, true if user is found|Kicks ''user'' with standard reason "You have been kicked"}}
====Config wrapper functions====
{{APIFunct1|has|name|const char*|name of the config string|bool, true if config string was found|Checks if the config string ''name'' exists in the configuration file}}
{{APIFunct1|iData|name|const char*|name of the config string|int|Gets integer data from configuration string ''name''}}
{{APIFunct1|lData|name|const char*|name of the config string|int64_t|Gets long (int64_t) data from configuration string ''name''}}
{{APIFunct1|fData|name|const char*|name of the config string|float|Gets float data from configuration string ''name''}}
{{APIFunct1|dData|name|const char*|name of the config string|double|Gets double data from configuration string ''name''}}
{{APIFunct1|sData|name|const char*|name of the config string|const char*|Gets string (char*) data from configuration string ''name''}}
{{APIFunct1|bData|name|const char*|name of the config string|bool|Gets bool data from configuration string ''name''}}
====Mobs====
====Permissions====
{{APIFunct1|setAdmin|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server administrator, providing him with full permissions.}}
{{APIFunct1|setOp|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server Operator}}
{{APIFunct1|setMember|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a regular member}}
{{APIFunct1|setGuest|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a guest}}
{{APIFunct1|isAdmin|name|const char*|Username in null terminated char array|bool, true if user is admin|Checks, if ''user'' is a server administrator}}
{{APIFunct1|isOp|name|const char*|Username in null terminated char array|bool, true if user is operator|Checks, if ''user'' is a server Operator}}
{{APIFunct1|isMember|name|const char*|Username in null terminated char array|bool, true if user is member|Checks, if ''user'' is a regular member}}
{{APIFunct1|Guest|name|const char*|Username in null terminated char array|bool, true if user is guest|Checks, if ''user'' is a guest}}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
ed71fc708354feccb4d321f22a3e4ea40c5f0f8f
170
169
2011-02-27T21:06:00Z
Delirium
18
/* Creating a plugin */
wikitext
text/x-wiki
Mineserver uses a C-plugin API which is described in this page.
==Creating a plugin==
You will need to include <code>plugin_api.h</code> to your project.
...write some more stuff here...
Example plugin structure:
<pre><nowiki>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <cstdlib>
#include <iostream>
#define MINESERVER_C_API
#include "../src/plugin_api.h"
#include "../src/logtype.h"
#define PLUGIN_VERSION 1.0
double pluginVersion = PLUGIN_VERSION;
#define PLUGIN_NAME "pressurplate"
const char* pluginName = PLUGIN_NAME;
const char* logSource = "plugin.screen";
mineserver_pointer_struct* mineserver;
PLUGIN_API_EXPORT void CALLCONVERSION pressurplate_init(mineserver_pointer_struct* mineserver_temp)
{
mineserver = mineserver_temp;
if (mineserver->plugin.getPluginVersion(pluginName) > 0)
{
mineserver->logger.log(LogType::LOG_INFO, logSource, "The " PLUGIN_NAME " plugin is already loaded");
return;
}
mineserver->logger.log(LogType::LOG_INFO, logSource, "Loaded " PLUGIN_NAME);
mineserver->plugin.setPluginVersion(pluginName, pluginVersion);
}
PLUGIN_API_EXPORT void CALLCONVERSION pressurplate_shutdown(void)
{
if (mineserver->plugin.getPluginVersion(pluginName) <= 0)
{
mineserver->logger.log(LogType::LOG_INFO, logSource, PLUGIN_NAME " is not loaded!");
return;
}
mineserver->logger.log(LogType::LOG_INFO, logSource, PLUGIN_NAME " has been unloaded!");
}
</nowiki>
</pre>
==Available functions==
===Mineserver===
====Chat====
{{APIFunct2|sendmsgTo|user|const char*|Username in null Terminated char array|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to specified ''user''}}
{{APIFunct1|sendmsg|msg|const char*|Message in null terminated char array|bool, telling it the user was found|Sends a message to all players, except they are in DND mode}}
{{APIFunct1|sendUserList|user|const char*|User in null terminated char array|bool, telling it the user was found|Sends the playerlist to ''user''}}
====Screen====
{{APIFunctVoid|log|msg|const char*|Message in null terminated char array|Prints message to server window}}
====Map====
{{APIFunct6|createPickupSpawn|x|int|x-coordinate|y|int|y-coordinate|z|int|z-coordinate|conut|int|How many to spawn(1-64)|health|int|item health. 0 is max health, max value depends on the item|user|const char*|Username|void|Spawns an item at (x,y,z) with type,count and health specified. If "user" is set, he will not be able to pick up the item right away to make it possible to throw stuff away.}}
{{APIFunct1|setTime|timeValue|int|value between 0 and 2400|bool|Sets server time to ''timeValue''}}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''getSpawn'''
| class="col1" | x
| class="col2" | int*
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int*
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int*
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | void
|- class="row5"
| class="col0" colspan="4" | Gets server spawn position
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''getBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Get block type and metadata (absolute block coordinates) in first world (id 0)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''getBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Gets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setBlock'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | type
| class="col2" | unsigned char
| class="col3" | block type
|- class="row5"
| class="col1" | meta
| class="col2" | unsigned char
| class="col3" | block metadata
|- class="row6"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row7"
| class="col0" colspan="4" | Set block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''setBlockW'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
| class="col1" | w
| class="col2" | int
| class="col3" | World ID
|- class="row5"
| class="col1" | type
| class="col2" | unsigned char*
| class="col3" | block type
|- class="row6"
| class="col1" | meta
| class="col2" | unsigned char*
| class="col3" | block metadata
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | Sets block type and metadata (absolute block coordinates)
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Function
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="5" | '''setSpawn'''
| class="col1" | x
| class="col2" | int
| class="col3" | x-coordinate
|- class="row2"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coordinate
|- class="row3"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coordinate
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | Set spawn to x, y, z (absolute coordinates)
|}
{{APIFunctVoid|saveWholeMap| |void| |Saves the whole map to disk}}
{{APIFunct2|getMapData_block|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_meta|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_skylight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
{{APIFunct2|getMapData_blocklight|x|int|x-coordinate|z|int|z-coordinate|unsigned char*| }}
====User Functions====
{{APIFunct1|toggleDND|user|const char*|Username in null terminated char array|bool, indicates if user was found|Toggles the DND (Do not Disturb)-Mode of a ''user''}}
{{APIFunct7|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|yaw|float*|yaw-Value|pitch|float*|pitch-Value|*stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct8|getPosition|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|w|int*|World ID|yaw|float*|yaw-Value|pitch|float*|pitch-Value| *stance|double|stance-Value|bool, true if user has been found|Finds a player and stores its info in the referenced variables}}
{{APIFunct4|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z''}}
{{APIFunct5|teleport|user|const char*|Username in null terminated char array|x|double*|x-coordinate|y|double*|y-coordinate|z|double*|z-coordinate|map|int|Map ID|bool, true if user was found|Teleports a ''user'' to ''x'',''y'',''z'' on ''map''}}
{{APIFunct2|setHealth|user|const char*|Username in null terminated char array|userHealth|int|Health of ''user''. Must not be greater than 20.|bool, true if user is not null|Sets the health of a ''user''.}}
{{APIFunct1|getHealth|user|const char*|Username in null terminated char array|int, player's health|Gets the health of a ''user''}}
{{APIFunct1|no paramters| | |int, number of players online|Gets the number of players online}}
{{APIFunct4|getItemInHand|user|const char*|Username in null terminated char array|*type|int|Type of item|*meta|int|Health of item|*quant|int|quantity of item|bool, true if user was found|Gets the item in the hand of ''user''}}
{{APIFunct4|setItemInHand|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Sets the item in the hand of ''user''}}
{{APIFunct4|addItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Adds the ''item'' to the ''user'''s inventory}}
{{APIFunct4|hasItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if the item is in Users inventory. Chests are unchecked.|Checks if ''item'' is in ''user'''s inventory}}
{{APIFunct4|delItem|user|const char*|Username in null terminated char array|type|int|Type of item|meta|int|Health of item|quant|int|quantity of item, must not be greater than 64|bool, true if user was found|Delets the ''item'' ''quantity'' times from the ''user'''s inventory. Chests are untouched.}}
{{APIFunct1|kick|user|const char*|Username in null terminated char array|bool, true if user is found|Kicks ''user'' with standard reason "You have been kicked"}}
====Config wrapper functions====
{{APIFunct1|has|name|const char*|name of the config string|bool, true if config string was found|Checks if the config string ''name'' exists in the configuration file}}
{{APIFunct1|iData|name|const char*|name of the config string|int|Gets integer data from configuration string ''name''}}
{{APIFunct1|lData|name|const char*|name of the config string|int64_t|Gets long (int64_t) data from configuration string ''name''}}
{{APIFunct1|fData|name|const char*|name of the config string|float|Gets float data from configuration string ''name''}}
{{APIFunct1|dData|name|const char*|name of the config string|double|Gets double data from configuration string ''name''}}
{{APIFunct1|sData|name|const char*|name of the config string|const char*|Gets string (char*) data from configuration string ''name''}}
{{APIFunct1|bData|name|const char*|name of the config string|bool|Gets bool data from configuration string ''name''}}
====Mobs====
====Permissions====
{{APIFunct1|setAdmin|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server administrator, providing him with full permissions.}}
{{APIFunct1|setOp|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a server Operator}}
{{APIFunct1|setMember|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a regular member}}
{{APIFunct1|setGuest|name|const char*|Username in null terminated char array|bool, true if user was found|Makes ''user'' to a guest}}
{{APIFunct1|isAdmin|name|const char*|Username in null terminated char array|bool, true if user is admin|Checks, if ''user'' is a server administrator}}
{{APIFunct1|isOp|name|const char*|Username in null terminated char array|bool, true if user is operator|Checks, if ''user'' is a server Operator}}
{{APIFunct1|isMember|name|const char*|Username in null terminated char array|bool, true if user is member|Checks, if ''user'' is a regular member}}
{{APIFunct1|Guest|name|const char*|Username in null terminated char array|bool, true if user is guest|Checks, if ''user'' is a guest}}
==Available callbacks==
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer200'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 200ms timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer1000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 1000ms (1s) timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="1" | '''Timer10000'''
| class="col1" | no params
| class="col2" |
| class="col3" |
|- class="row2"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool, isn't used
|- class="row3"
| class="col0" colspan="4" | 10s timer callback
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="3" | '''PlayerChatPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | timestamp
| class="col2" | size_t
| class="col3" | time of the message
|- class="row2"
| class="col1" | msg
| class="col2" | const char*
| class="col3" | Message in null terminated char array
|- class="row3"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row4"
| class="col0" colspan="4" | called on chat message processing, returning false will terminate the callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''PlayerChatCommand'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in null terminated char array
|- class="row2"
| class="col1" | command
| class="col2" | const char*
| class="col3" | command
|- class="row2"
| class="col1" | argc
| class="col2" | int
| class="col3" | argument count
|- class="row3"
| class="col1" | arguments
| class="col2" | const char**
| class="col3" | list of arguments
|- class="row4"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row5"
| class="col0" colspan="4" | called when chat command is used
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="6" | '''BlockPlacePre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int32_t
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int8_t
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int32_t
| class="col3" | z-coord
|- class="row5"
| class="col1" | block
| class="col2" | int16_t
| class="col3" | block type
|- class="row6"
| class="col1" | direction
| class="col2" | int8_t
| class="col3" | placement direction
|- class="row7"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row8"
| class="col0" colspan="4" | called on block placement, returning false will prevent block placement and terminate callback.
|}
{| class="wikitable"
|- class="row0"
! class="col0" | Name
! class="col1" | Parameter name
! class="col2" | Parameter type
! class="col3" | Parameter info
|- class="row1"
| class="col0" rowspan="4" | '''BlockBreakPre'''
| class="col1" | user
| class="col2" | const char*
| class="col3" | Username in char array
|- class="row2"
| class="col1" | x
| class="col2" | int
| class="col3" | x-coord
|- class="row3"
| class="col1" | y
| class="col2" | int
| class="col3" | y-coord
|- class="row4"
| class="col1" | z
| class="col2" | int
| class="col3" | z-coord
|- class="row5"
! class="col0" | Return value
| class="col1 rightalign" colspan="3" | bool
|- class="row6"
| class="col0" colspan="4" | called on block break, returning false will prevent block breaking and terminate callback.
|}
ToDo:
setHook("PlayerLoginPre", new Hook2<bool,const char*,char***>);
setHook("PlayerLoginPost", new Hook1<bool,const char*>);
setHook("PlayerNickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerKickPost", new Hook2<bool,const char*,const char*>);
setHook("PlayerQuitPost", new Hook1<bool,const char*>);
setHook("PlayerChatPost", new Hook3<bool,const char*,time_t,const char*>);
setHook("PlayerArmSwing", new Hook1<bool,const char*>);
setHook("PlayerDamagePre", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDamagePost", new Hook3<bool,const char*,const char*,int>);
setHook("PlayerDisconnect", new Hook3<bool,const char*,uint32,uint16>);
setHook("PlayerDiggingStarted", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDigging", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("PlayerDiggingStopped", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPre", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockBreakPost", new Hook4<bool,const char*,sint32,sint8,sint32>);
setHook("BlockNeighbourBreak", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockPlacePre", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockPlacePost", new Hook5<bool,const char*,sint32,sint8,sint32,sint16>);
setHook("BlockNeighbourPlace", new Hook7<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32>);
setHook("BlockReplacePost", new Hook6<bool,const char*,sint32,sint8,sint32,sint16,sint16>);
setHook("BlockNeighbourReplace", new Hook9<bool,const char*,sint32,sint8,sint32,sint32,sint8,sint32,sint16,sint16>);
9566af2c0875ef6269f0666bfab509598475b20b
Main Page
0
1
171
106
2011-02-27T23:14:22Z
Fador
8
ToDo link
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]]
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
* [[Plugin API]]
* [[ToDo]]
----
* [[Plugins]]
bf95ef78e6fcfb01e57d908b9698ae5159f29f43
187
171
2011-03-01T19:26:40Z
Nredor
10
wikitext
text/x-wiki
Hi there! Welcome to the Mineserver wiki. Below is a list of articles that may or may not need writing. This page will be fleshed out when we have some more content here.
If you feel like creating, fixing and/or adding anything, you can log in with your forum account. If you don't yet have a forum account, you can create one [http://mineserver.be/forums/ here]. This wiki will become publicly editable when there are a few more users and we have some spam/vandal control in place.
* [[Installation]]
* [[Configuration]]
* [[Commands]] (needs command plugin!)
* [[Frequently Asked Questions]]
* [[Advanced Usage]]
* [[Coding Style]]
* [[Plugin API]]
* [[ToDo]]
----
* [[Plugins]]
ca2c867a052e376eec37fcecfc4901fcb8559a3c
ToDo
0
30
172
2011-02-27T23:19:42Z
Fador
8
Created page with "Things we need to do Please help with formatting! '''NOT IN ORDER!''' == Features == * Redstone * Minecarts/boats * Projectile tracking (Can be thrown/shoot but server has n..."
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
'''NOT IN ORDER!'''
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (Already PassiveMobs plugin!)
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
1a91d3e511077980edbeebb804d995bc2bb5e9ea
173
172
2011-02-28T13:15:53Z
Trigg
19
/* Features */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
'''NOT IN ORDER!'''
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (Already PassiveMobs plugin!)
* Base Entity class and subclass other Entities from it
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
0b9b41dba576f800aafdfb275bf8f860ce9ce1a3
174
173
2011-02-28T14:13:11Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
'''NOT IN ORDER!'''
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
86656d31e53e1194f644c3c84f72fe5fcd9aa143
175
174
2011-02-28T15:46:05Z
Fador
8
chunk related stuff
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
'''NOT IN ORDER!'''
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* New chunk storage format
* Chunk loading/saving plugin API stuff
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
9fa8f49e8a8e90107bd3a05ea05f9e1537a377f7
176
175
2011-02-28T21:52:09Z
Fador
8
TNT \o/
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
'''NOT IN ORDER!'''
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* New chunk storage format
* Chunk loading/saving plugin API stuff
* TNT
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
71569cd57327a094f5bf7252fdc4740927f98ed6
177
176
2011-02-28T23:11:59Z
Jailout2000
21
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Please note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* New chunk storage format
* Chunk loading/saving plugin API stuff
* TNT
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
3ecf09c30b5e2b6e05a47f162cd394aa3f4b31ad
179
177
2011-03-01T06:16:48Z
Joehillen
22
Added link to the new format.
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Please note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
7b20d7b22a49261bf265e060f8af80518de972c2
188
179
2011-03-01T19:36:39Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
a4526488e714bb69fdc51f351f602ffe29aea568
191
188
2011-03-01T21:43:50Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
dfa1259f5c9b3447a2bfdef69b0a3e6d0be8f6b1
192
191
2011-03-01T21:47:07Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
7afeff4e8dc8b8562f8a48d8f6fbb5a94a848af7
193
192
2011-03-01T21:49:10Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
05500c652dee083a4e467641bba0e386e7d3e62c
194
193
2011-03-01T21:49:47Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
7ea4dcfb3a57fe4ad150573c22b27c2d7e101efe
195
194
2011-03-02T02:46:05Z
Winex
23
/* Roadmap */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
67a525f052ec29024f973314b038a06248252325
197
195
2011-03-02T09:11:33Z
Nredor
10
/* Bugfixes */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
a5cc48bc1b03c40c2cf699cda7760837c86bbc7d
198
197
2011-03-02T09:17:47Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* McRegion fileformat
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
a3bd3f02b3a1ec55e6a0fe74f35c7e7bd2519d90
199
198
2011-03-02T09:18:57Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* New chunk storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.0.17''':
1b89eeacf37d74bd50cd9419f3c862a411d6a5de
200
199
2011-03-02T09:20:05Z
Winex
23
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.0.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.0.17''':
5a3c37d12e807714c5f8e970f0e48f2add77eded
Moving over from official server
0
24
178
144
2011-02-28T23:15:57Z
Jailout2000
21
fixed typos, etc.
wikitext
text/x-wiki
If you have already a working Minecraft server, but want to use Mineserver, you can easily move over!
==Preparation==
First of all, make a backup of your whole Minecraft server. If anything went differently from your expectations, this will allow you to go back.
Second, make sure your Minecraft world is in "old" Beta 1.2 File format. As of 26 Feb. 2011, Mineserver does not support the new Beta 1.3 File format. Beta 1.3 clients can connect though.
==Do the work==
[[Installation|Install]] Mineserver in a directory on your server. Edit the settings file to fit your needs, copy your world to the desired path and make sure the path is correctly specified in the settings. That's it! You can start Mineserver and start playing.
==What about plugins?==
At the moment, there are not many [[plugins]]. But you can write your own - just check the [[Plugin API]].
a968adb6acb7b2034672fd801b296ca0fd923d28
Installation
0
3
180
125
2011-03-01T19:08:43Z
Nredor
10
/* Prerequisites */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Download the latest zip file from mineserver.be/downloads and make a new folder on your desktop, and name it whatever you want
Extract the files from the zip into that folder and edit the configuration, make sure your name is on the roles.txt list for you to be admin
Goto ahead and run the mineserver bat file and the server will start
To get your ip address, goto www.cmyip.com
Edited by liamallan
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
b4b21663e728574b875b325de61ac95eea6540fe
181
180
2011-03-01T19:11:05Z
Nredor
10
/* Windows */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
a3c77d6b397a44124c1a66422b7d15922ee1bf33
182
181
2011-03-01T19:12:00Z
Nredor
10
/* Windows */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
:)
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
a07281b686ebac6917f41a424698b759fb7bf0a9
183
182
2011-03-01T19:12:17Z
Nredor
10
/* CentOS and Red Hat */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If you are using debian/ubuntu or similar use <code>make DEBIAN=1</code> instead of <code>make</code>
# Change to the source directory
user@workstation:~/mineserver$ cd src
# Run make to build the binary
user@workstation:~/mineserver/src$ make
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mineserver.o mineserver.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o map.o map.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o chat.o chat.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o commands.o commands.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o config.o config.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o constants.o constants.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o logger.o logger.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mapgen.o mapgen.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o nbt.o nbt.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o packets.o packets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o physics.o physics.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o sockets.o sockets.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o tools.o tools.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o user.o user.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o noiseutils.o noiseutils.cpp
g++ -I. -I/usr/Local/include -I/usr/include -L/usr/local/lib -c -o mersenne.o mersenne.cpp
g++ -L/usr/local/lib -L/usr/lib -lpthread -levent -lz -lnoise mineserver.o map.o chat.o commands.o
config.o constants.o logger.o mapgen.o nbt.o packets.o physics.o sockets.o tools.o user.o
noiseutils.o mersenne.o -o mineserver
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
ffaac35d04058240c55b56167bc1f66b460244e5
184
183
2011-03-01T19:15:18Z
Nredor
10
/* GNU/Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If make fails to find libnoise try <code>make DEBIAN=1</code> instead of <code>make</code>
# Run cmake to generate makefile
user@workstation:~/mineserver$ cmake .
# Run make all to build the binary
user@workstation:~/mineserver/src$ make all
(Lots of compile output here)
# Done!
user@workstation:~/mineserver/src$
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
dc19d69120466bb11de9f717bcb40a2aca34b678
185
184
2011-03-01T19:16:39Z
Nredor
10
/* GNU/Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
'''NOTE'''! If make fails to find libnoise try <code>make DEBIAN=1</code> instead of <code>make</code>
# Run cmake to generate makefile
user@workstation:~/mineserver$ cmake .
# Run make all to build the binary
user@workstation:~/mineserver/src$ make all
(Lots of compile output here)
# Done!
# Run make install to move all necessary files to bin
user@workstation:~/mineserver/src$ make install
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux (This might be outdated?)=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
dee35f5d227551d7547a37e5f3cdd5f24225d358
196
185
2011-03-02T03:29:45Z
Winex
23
/* GNU/Linux */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
# Run cmake to generate makefile
user@workstation:~/mineserver$ cmake .
# Run make all to build the binary
user@workstation:~/mineserver/src$ make all
(Lots of compile output here)
# Done!
# Run make install to move all necessary files to bin
user@workstation:~/mineserver/src$ make install
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux (This might be outdated?)=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
144cc994211a0cd3ff0de980d7d5a81ace147818
Configuration
0
2
186
109
2011-03-01T19:17:35Z
Nredor
10
wikitext
text/x-wiki
* Latest configuration file with explanations can be found here: https://github.com/fador/mineserver/blob/master/files/config.cfg
* Configurable item aliases can be found here: https://github.com/fador/mineserver/blob/master/files/item_alias.cfg
5260019132c6ee8a3a01c388f2990bd3a9c2953a
ToDo
0
30
201
200
2011-03-02T09:20:53Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugfixes ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
8589e95b56504c0db6b7cb90ce5e0ea38d673e02
202
201
2011-03-02T09:23:08Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features TODO ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
53a7147f11f53195c710ab9462e9355ecf902550
203
202
2011-03-02T09:23:28Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features TODO ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
924bfdd4e1a72a80c438b3b66258ff56310964a9
204
203
2011-03-02T09:23:45Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
63f35251d1f5b72f9917433e9d27b20bf9b64050
205
204
2011-03-02T09:25:54Z
Nredor
10
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
d6eebf22602ca4d5f07472eb25ba9e29f877ceba
206
205
2011-03-07T15:52:43Z
Fador
8
/* Features ToDo */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
339e3227f74e81e8990287ade21e8b2c3de5369c
207
206
2011-03-08T02:57:28Z
Thorn
24
/* Bugs to fix */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
== Roadmap ==
To Do before version '''0.1.16''':
* Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
2acbe445678cb946495f08408139427bce02b9f3
209
207
2011-03-10T19:58:29Z
Fador
8
/* Roadmap */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
c2b51dec186470ba4cccc7c515a5e0ea47f79b77
210
209
2011-03-10T19:58:40Z
Fador
8
/* Features ToDo */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
* Complete CMake build system
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
32fcf9b4b7ca48bf13fc278f5d1f210f6b3e36ed
212
210
2011-03-11T11:37:06Z
Fador
8
/* Roadmap */ Build system should now affect version numbering
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
b404c69a4f5bf43c1c4599223074f42d7b366ede
213
212
2011-03-11T11:44:37Z
Fador
8
/* Bugs to fix */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
* Chunks are not sent at around 10 chunks from the spawn point, appeared after "Chunk sending fix"
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
f392ddb02fd0597a1a4c2f953495e526cb9c5aa1
214
213
2011-03-12T00:46:27Z
Fador
8
/* Bugs to fix */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
* ['''DONE'''] Chunks are not sent at around 10 chunks from the spawn point, appeared after "Chunk sending fix"
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
057805f055c5db28f108a420b60516ebf009c5ef
215
214
2011-03-15T21:18:14Z
Fador
8
/* Features ToDo */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
* Permission system
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
* ['''DONE'''] Chunks are not sent at around 10 chunks from the spawn point, appeared after "Chunk sending fix"
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
To Do before version '''0.1.17''':
* Working water/lava
* Aggressive mobs
2bca7d678644cd99e9dd8a1ecbda110fa523a7ff
228
215
2016-01-20T21:01:22Z
Fador
8
/* Roadmap */
wikitext
text/x-wiki
Things we need to do
Please help with formatting!
Note that '''these are not prioritized'''; items are placed in no specific order as they are added to the list
== Features ToDo ==
* Redstone
* Minecarts/boats
* Projectile tracking (Can be thrown/shoot but server has no idea of the positions)
* Mobs (There's already PassiveMobs plugin that can be used as a base to make improvements)
* Base Entity class and subclass other Entities from it
* Entity tracking (So that drops flow with water)
* ['''DONE'''] [http://mojang.com/2011/02/16/minecraft-save-file-format-in-beta-1-3/ New chunk storage format]
* Chunk loading/saving plugin API stuff
* TNT
* Doublechests
* Dispensers
* Beds
* Fire
* Permission system
== Bugs to fix ==
* Water/Lava working (currently water is flowing but buggy)
* ['''DONE'''] Chunk sending fix (first send prechunks and then chunks), this might cause currently client to crash.
* Fix user spawn-handling (Currently causes invisible players)
* Trees spawning in air/water/sand
* Trees forming leaves on only one side
* Ctrl-C in ncurses console trashes terminal
* No red fog in nether
* Destroying sand(any falling block?) destroys stone block below.
* ['''DONE'''] Chunks are not sent at around 10 chunks from the spawn point, appeared after "Chunk sending fix"
== Roadmap ==
To Do before version '''0.1.16''':
* ['''DONE'''] Support MCRegion world storage format
To Do before version '''0.2.x''':
* Projectile Tracking
* Fix user spawn-handling (Currently causes invisible players)
To Do before version '''0.2.x+1''':
* Working water/lava
* Aggressive mobs
fbc357250a6964f894eab44f0729b90532d3f267
Installation
0
3
208
196
2011-03-08T16:30:52Z
Winex
23
add directory structure table
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
# Run cmake to generate makefile
user@workstation:~/mineserver$ cmake .
# Run make all to build the binary
user@workstation:~/mineserver/src$ make all
(Lots of compile output here)
# Done!
# Run make install to move all necessary files to bin
user@workstation:~/mineserver/src$ make install
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux (This might be outdated?)=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
==Directory Structure==
{| class="wikitable" style="font-size:90%"
|-
!
! Unix install
! Unix distribution
! Windows
|-
! Install Prefix
| <code>$HOME</code> or <code>~</code>
| <code>/usr</code>
| <code>C:\Program Files\mineserver</code>
|-
! Configuration<sup>1</sup>
| <code>$HOME/.mineserver</code>
| <code>/etc/mineserver</code>
| <code>%AppData%\.mineserver</code>
|-
! Working Directory<sup>2</sup>
| <code>$HOME/.mineserver</code>
| <code>/var/lib/mineserver</code>
| <code>%AppData%\.mineserver</code>
|-
! Binaries
| colspan="2" | <code>$PREFIX/bin</code>
| <code>%PREFIX%\bin</code>
|-
! Plugins
| colspan="2" | <code>$PREFIX/lib/mineserver</code>
| <code>%PREFIX%\bin</code>
|-
! Resources
| colspan="2" | <code>$PREFIX/share/mineserver</code>
| <code>%PREFIX%\share</code>
|-
|}
* <sup>1</sup> Specified through the [[Command Line]] arguments
* <sup>2</sup> Specified in [[Configuration]] file
656d228c01bf67301faac48a428a9c32ea636f01
211
208
2011-03-11T11:06:16Z
Xoft
25
/* Windows */
wikitext
text/x-wiki
Installation of Mineserver is generally trouble-free, but this page should offer a little more detail for those who desire it. Right now only source distributions are available; this will change once there is a stable release.
==Binary Packages==
Currently we have binaries for Windows.
Download from here: http://mineserver.be/downloads/ and install using installer.
==Source Distributions==
===Prerequisites===
Mineserver requires 3 external libraries: zlib, libevent and libnoise (possibly from [https://github.com/qknight/libnoise https://github.com/qknight/libnoise]). The method of obtaining these libraries may differ system to system, so consult your operating system's manual.
===General===
Installation is generally very simple and consists of just a few steps.
# Obtain source
# Install prerequisites
# Build Mineserver
# Edit config
===Obtaining the Source Code===
The source code for Mineserver is available from [https://github.com/fador/mineserver GitHub] and in future as tarballs for stable revisions.
Checking out the source from git is straightforward: simply clone the repository from GitHub and it's ready to be compiled. An explanation of how to use git is outside the scope of this article, but there are plentiful resources on the topic to be found with your favourite search engine.
===Installing prerequisites===
====Windows====
Prerequisites can be found at http://www.mineserver.be/downloads buildpack or you can compile those yourself. For that you will need VS2010 or mingw (no supported). Visual Studio 2008 Express (C++ version) works as well, but you need to create project files manually (for now, until we have a CMake fix)
====Debian and Similar====
To build software on Debian, the <code>build-essential</code> package is required. This package will provide you with the basic gcc/g++ toolchain. The prerequisites for Mineserver can be found in the packages zlib1g-dev, libevent-dev and libnoise-dev.
====CentOS and Red Hat====
Most dependancies can be installed with the following commands:
# Install EPEL (Extra Packages for Enterprise Linux)
sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
sudo yum install git libevent libevent-devel zlib zlib-devel
However CentOS, and RHEL do not provide support for libnoise natively. As such we will need to manually compile and install the library.
wget http://prdownloads.sourceforge.net/libnoise/libnoisesrc-1.0.0.zip?download -O libnoisesrc-1.0.0.zip
unzip libnoisesrc-1.0.0.zip; cd noise
less README # Read this
make
sudo cp -R include /usr/local/include/noise
sudo cp lib/* /usr/local/lib
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so.0
sudo ln -s /usr/local/lib/libnoise.so.0.3 /usr/local/lib/libnoise.so
sudo echo "/usr/local/lib" > /etc/ld.so.conf/user.conf
sudo /sbin/ldconfig
You also have to copy the contents of the src folder of the libnoise package into a folder called libnoise within the mineserver src directory:
change directory to your mineserver src directory
mkdir libnoise
cp -R /path/to/libnoise/src/* ./
make
====BSD Variants====
Due to a problem with the libnoise package, you may need to create the proper link for the libnoise shared object file:
ln -s /usr/local/lib/libnoise.so.0 /usr/local/lib/libnoise.so
====Arch Linux====
You can obtain and install the required [http://aur.archlinux.org/packages.php?ID=39041 libnoise] package through [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Run the <code>make</code> command.
====OS X====
To install third party libraries on OS X, some convenient ways exist.
Note that zlib ships with OS X by default.
===== MacPorts or Fink =====
You can install zlib and libevent using Macports:
sudo port install libevent
or Fink:
sudo apt-get install libevent1
Either way, you will need to build libnoise yourself. On OS X, this is best done by using qknight's unofficial branch. First install the libnoise prerequisities:
sudo port install cmake doxygen
or Fink:
sudo apt-get install cmake doxygen
Now you can get the code:
git clone https://github.com/qknight/libnoise
cd libnoise
mkdir build
cd build
cmake ..
make
sudo make install
===== Homebrew =====
With homebrew installed, you can just install libevent:
brew install libevent
A formular for libnoise can be found on [http://github.com/krono/homebrew krono’s homebrew fork].
Using that, you can install libnoise just the same way:
brew install libnoise
It does not depend on cmake and doxygen.
===Building Mineserver===
====Windows====
(needs to be filled in)
====GNU/Linux====
To build the mineserver binary, use the following commands. The output should be very similar to that below.
# Run cmake to generate makefile
user@workstation:~/mineserver$ cmake .
# Run make all to build the binary
user@workstation:~/mineserver/src$ make all
(Lots of compile output here)
# Done!
# Run make install to move all necessary files to bin
user@workstation:~/mineserver/src$ make install
If you receive errors referring to missing files like this:
mineserver.cpp:0:0: error: something.h: No such file or directory
make: *** [mineserver.o] Error 1
Ensure that you have all the prerequisites installed. <code>zlib.h</code> is zlib, <code>event.h</code> is libevent and <code>noise.h</code>, <code>interp.h</code> or <code>mathconsts.h</code> are libnoise.
=====Arch Linux (This might be outdated?)=====
To install the latest development version of mineserver, you can download the [http://aur.archlinux.org/packages.php?ID=44017 mineserver-git] package from [https://wiki.archlinux.org/index.php/Arch_User_Repository AUR].
Example on how to install the package:
user@host ~ % wget http://aur.archlinux.org/packages/mineserver-git/mineserver-git.tar.gz
user@host ~ % tar xfz mineserver-git.tar.gz
user@host ~ % cd mineserver-git
user@host ~/mineserver-git % makepkg
user@host ~/mineserver-git % sudo pacman -U mineserver-git-*.pkg.tar.xz
And you're done. You can run the server with <code>mineserver /usr/share/mineserver/config.cfg</code>
''Note: if you want to change the default configuration, you will have to copy them into another directory.''
This is an example on how you copy all the configuration files to the ~/minecraft-server directory which you then can change to your preferences.
user@host ~ % mkdir minecraft-server && cd minecraft-server
user@host ~ % cp /usr/share/minecraft/* .
user@host ~ % ls
admin.txt banned.txt config.cfg item_alias.cfg motd.txt rules.txt whitelist.txt
You can then run the server by issuing <code>mineserver</code>, without specifying the configuration file location, since mineserver will look for it in the current directory.
====OS X====
===== Macports =====
You can build, ensuring that you point the compiler to any Macports-installed headers and libraries:
cd src
CXXFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make
===== Fink =====
You can build, ensuring that you point the compiler to any Fink-installed headers and libraries:
cd src
CXXFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make
===== Homebrew =====
Homebrew installs in a System-Known location, so you just have to make.
cd src
make
===Editing the Config===
This part is nice and easy. Grab the default config files from the <code>bin</code> directory in the distribution and view the [[configuration]] article to get accustomed with the options available.
==Directory Structure==
{| class="wikitable" style="font-size:90%"
|-
!
! Unix install
! Unix distribution
! Windows
|-
! Install Prefix
| <code>$HOME</code> or <code>~</code>
| <code>/usr</code>
| <code>C:\Program Files\mineserver</code>
|-
! Configuration<sup>1</sup>
| <code>$HOME/.mineserver</code>
| <code>/etc/mineserver</code>
| <code>%AppData%\.mineserver</code>
|-
! Working Directory<sup>2</sup>
| <code>$HOME/.mineserver</code>
| <code>/var/lib/mineserver</code>
| <code>%AppData%\.mineserver</code>
|-
! Binaries
| colspan="2" | <code>$PREFIX/bin</code>
| <code>%PREFIX%\bin</code>
|-
! Plugins
| colspan="2" | <code>$PREFIX/lib/mineserver</code>
| <code>%PREFIX%\bin</code>
|-
! Resources
| colspan="2" | <code>$PREFIX/share/mineserver</code>
| <code>%PREFIX%\share</code>
|-
|}
* <sup>1</sup> Specified through the [[Command Line]] arguments
* <sup>2</sup> Specified in [[Configuration]] file
e2fd63fc196ff627430ac615d2e8a4e7041834a0
User:RinseeNobi
2
31
216
2012-04-10T11:31:21Z
RinseeNobi
30
Created page with "[http://www.prodivita.nl Proteine Dieet] || [http://www.prodivita.nl Dieet]"
wikitext
text/x-wiki
[http://www.prodivita.nl Proteine Dieet] || [http://www.prodivita.nl Dieet]
79c0a38599936f06d766bd02e4274168f8064bb7
Raspberry Pi
0
32
217
2012-08-08T11:24:00Z
Timatooth
29
Created page with "It works! Here I will give a brief overview on how it performs and how to install Mineserver on the Raspberry Pi Model B. Mineserver was first compiled on the Raspberry Pi on W..."
wikitext
text/x-wiki
It works!
Here I will give a brief overview on how it performs and how to install Mineserver on the Raspberry Pi Model B.
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds and from then you can join using the Official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false in config.cfg
Generating chunks uses about 90% cpu so staying around one area is best or move around slowly (not sprinting) or else you'll read time out.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
#make will take quite a while to complete and you may see warnings which _should_ be ok
make
cd bin
#here you can edit the config.cfg file to suit your needs eg run in offline mode to test.
./mineserver
#to stop the server press CTRL + C and it will shutdown.
</code>
5fd8b9d3289becf6a986594de79a1b38e1cd4194
218
217
2012-08-08T11:30:02Z
Timatooth
29
wikitext
text/x-wiki
It works!
Here I will give a brief overview on how it performs and how to install Mineserver on the Raspberry Pi Model B.
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds and from then you can join using the Official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false in config.cfg
Generating chunks uses about 90% cpu so staying around one area is best or move around slowly (not sprinting) or else you'll read time out.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command make will take a long time to run and will spit out warnings currently which is usually normal.
#./mineserver starts the server once started
#when running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
ec85f6906d57a0786f95320db50dad58bf23515b
219
218
2012-08-08T11:32:06Z
Timatooth
29
wikitext
text/x-wiki
It works!
Here I will give a brief overview on how it performs and how to install Mineserver on the Raspberry Pi Model B.
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds and from then you can join using the Official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false in config.cfg
Generating chunks uses about 90% cpu so staying around one area is best or move around slowly (not sprinting) or else you'll read time out.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command make will take a long time to run and will spit out warnings currently which is usually normal.
#./mineserver starts the server once started
#when running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
ffae77ad6fc65dc2fa339e9cdebcec95932787fa
220
219
2012-08-08T11:36:52Z
Timatooth
29
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds and from then you can join using the Official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false in config.cfg
Generating chunks uses about 90% cpu so staying around one area is best or move around slowly (not sprinting) or else you'll read time out.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command make will take a long time to run and will spit out warnings currently which is usually normal.
#./mineserver starts the server once started
#when running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
cdb3123a5b27fbd0cfb6fc434f7c11e381109d34
221
220
2012-08-08T11:43:58Z
Timatooth
29
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds and from then you can join using the Official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false in config.cfg
Generating chunks uses about 90% cpu so staying around one area is best or move around slowly (not sprinting) or else you'll read time out.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command 'make' will take a long time to compile and will spit out warnings which is usually normal.
#the executable file will be located in /home/pi/src/mineserver/bin unless you specify something else.
#./mineserver starts the server once successfully compiled.
#When running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
f5012218defcdd1ec5b4c6efc483b762c3ee61d5
222
221
2012-08-08T11:50:12Z
Timatooth
29
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds. Connect using the official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false; in config.cfg.
Generating chunks uses about 90% cpu so try not to sprint into new areas quickly because your client will issue a "Read Timed Out" message. When chunks are not being generated approximately 1.6% cpu is used with one player walking, digging etc.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command 'make' will take a long time to compile and will spit out warnings which is usually normal.
#the executable file will be located in /home/pi/src/mineserver/bin unless you specify something else.
#./mineserver starts the server once successfully compiled.
#When running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
7ad50d74b9570193e193a8788ae47311b316ae8b
224
222
2012-08-08T13:03:55Z
Timatooth
29
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
[[File:Mineserver_on_raspberry_pi.png]]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds. Connect using the official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false; in config.cfg.
Generating chunks uses about 90% cpu so try not to sprint into new areas quickly because your client will issue a "Read Timed Out" message. When chunks are not being generated approximately 1.6% cpu is used with one player walking, digging etc.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command 'make' will take a long time to compile and will spit out warnings which is usually normal.
#the executable file will be located in /home/pi/src/mineserver/bin unless you specify something else.
#./mineserver starts the server once successfully compiled.
#When running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
85bd349bde5d152f5556402bfaf524166ad8c86d
226
224
2012-12-13T18:25:39Z
Kln
33
Turns out you need libssl as well so I added that to the documentation
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
[[File:Mineserver_on_raspberry_pi.png]]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds. Connect using the official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false; in config.cfg.
Generating chunks uses about 90% cpu so try not to sprint into new areas quickly because your client will issue a "Read Timed Out" message. When chunks are not being generated approximately 1.6% cpu is used with one player walking, digging etc.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
*libssl - For secure network communication
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command 'make' will take a long time to compile and will spit out warnings which is usually normal.
#the executable file will be located in /home/pi/src/mineserver/bin unless you specify something else.
#./mineserver starts the server once successfully compiled.
#When running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libnoise-dev libevent-dev libssl-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
4f3266892d0a5d62940808bbbff524d122c970fd
227
226
2012-12-15T01:05:06Z
Kln
33
wikitext
text/x-wiki
Installing Mineserver (from source) on the raspberry pi is surprisingly easy!
Mineserver was first compiled on the Raspberry Pi on Wednesday 8th August 2012 NZST. Using commit e973517e24 [https://github.com/fador/mineserver/commit/e973517e24ca3e30487e8bcd1dc6b42ce9197874]
[[File:Mineserver_on_raspberry_pi.png]]
== Gameplay and Performance ==
Initial generation of spawn area takes about 20 seconds. Connect using the official Minecraft 1.3.1 client. By default Mineserver operates in 'online' mode and will check with the Mojang login server. You can disable session verification by setting system.user_validation = false; in config.cfg.
Generating chunks uses about 90% cpu so try not to sprint into new areas quickly because your client will issue a "Read Timed Out" message. When chunks are not being generated approximately 1.6% cpu is used with one player walking, digging etc.
When initially started, it used about 47% of the raspberry pi's memory but now sits at about 18% with one player.
== What Works ==
*Logging in
*Chat (including server console chat)
*Chunk saving
*Block breaking/placing
*Mobs - including killing and getting drops
*Crafting
*Death
== Requirements to Build ==
Mineserver depends on the following libraries.
*libnoise - land generation
*libevent - asynchronous event notification software library.
*libssl - For secure network communication
*libncurses - For the curses interface
Additionally you will need the following tools to build Mineserver
*CMake
== Building Instructions ==
These instructions are intended for Raspbian “wheezy” - the recommended Linux distro.
Because my Raspberry Pi is not connected to the internet, I compiled all the required libraries from source [which took ages] so I '''cannot vouch for the correctness of these commands assuming your pi ''is'' connected to the internet.'''
Please run these commands under the normal 'pi' user not root.
#The command 'make' will take a long time to compile and will spit out warnings which is usually normal.
#the executable file will be located in /home/pi/src/mineserver/bin unless you specify something else.
#./mineserver starts the server once successfully compiled.
#When running CTRL + C stops the server gracefully.
<code>
sudo apt-get update
sudo apt-get install libncurses-dev libnoise-dev libevent-dev libssl-dev cmake git-core
mkdir src && cd src
git clone git://github.com/fador/mineserver.git
cd mineserver
cmake .
make
cd bin
./mineserver
</code>
Pressing CTRL + C will gracefully stop the server.
665a0f27ef1e143a3c3090aa55d101f96a036d50
File:Mineserver on raspberry pi.png
6
33
223
2012-08-08T13:02:06Z
Timatooth
29
Mineserver running on raspberry pi
wikitext
text/x-wiki
Mineserver running on raspberry pi
760673ac586c4875e4258a9d0e420737914529fa
Coding Style
0
6
225
102
2012-12-04T19:34:18Z
Tobyp
32
camelCase is with the caps in the middle, but not the beginning (like the humps on camels). And what better way to make it understood than to actually use it?
wikitext
text/x-wiki
This is a suggestion for a coding style to be used consistently accross Mineserver's source code.
* '''Indentation''': 2 spaces
* '''Class names''': PascalCase (e.g.: '''FurnaceManager''').
* '''Variable and method names''': camelCase, (e.g.: '''updateWorld''', '''userCommands''').
** '''Pointer variables''': Use '''Foo* bar''' instead of '''Foo *bar'''
** Using short names for loop variables is ok, e.g. '''i''', '''j'''. Otherwise use descriptive names and don't use abbreviations all over the place, to make the code more readable.
* '''Inline methods''': Keep them short (max 10-15 lines at most).
* '''Documentation''': Use doxygen-style (javadoc-style?) documentation for at least all public methods. Example:
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* Foo::foo(Bar* bar);
** Note: Documentation should go in to the header file.
* '''Class definitions''': Put public methods at the top of the definition. They're usually the most interesting part from a user's point of view. Private stuff at the bottom.
class Foo
{
public:
Foo();
~Foo();
/**
* The foo() method. Does some fooish stuff, yo!
* @param bar Bar instance to be used in foo().
* @return An instance of Baz that does something fantastic!
*/
Baz* foo(Bar* bar);
private:
/* private instance vars etc go here.*/
};
** '''Instance variables''' should usually be accessible through getter and setter methods and thus be private. In some cases having them public is fine (e.g. when they're accessed all over the place and modifiying them happens all over the place as well. Usually this is the case for "dumb classes" used as pure data structures. We should consider using a '''struct''' instead for these cases.). Also, don't use prefixes for public instance variables, since it's ugly to use. For private instance variables we could choose to use '''m_foo''' and have a getter method be just '''foo()''' and a setter '''setFoo()'''.
** '''Static (class) variables''' should start with just an underscore, e.g. '''_instance''', '''_users''' etc.
* '''Namespaces''': We probably should use them.
* '''Codeblocks''': Use braces always for clarity and to prevent bugs while editing code
if (true)
{
foo = bar;
}
if (true)
{
foo = bar;
foo2 = bar2;
}
* '''Spacing''':
Foo* bar = new Foo();
fooBar(param1, param2, param3);
for (int i = 0; i < 1; i++)
{
...
}
3054a238da5bff44d14eab8c6fb76eca4a41cec5